@manhng

Welcome to my blog!

MSBuild in VS2022

December 12, 2021 16:34

MSBuild in VS2022 (edit)

ASP.NET Web Deployment using Visual Studio: Command Line Deployment | Microsoft Docs

Deploying a Web App from a Command Line using MSBuild and WebDeploy - CodeProject

Deploying Web Packages | Microsoft Docs

Create a local user or administrator account in Windows (microsoft.com)

Windows 10 User Account Management

compmgmt.msc

User: test

Pass: test

Member Of: Administrators

Web Deploy (WebDeploy)

msbuild C:\Src\VehicleMonitoring.sln /p:DeployOnBuild=true /p:PublishProfile=C:\Src\VehicleMonitoring\Properties\PublishProfiles\IISProfile.pubxml

VS 2019
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\DevEnv.exe"

MSBuild.exe
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe"

VS 2022
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\DevEnv.exe"

MSBuild.exe
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe"

IISProfile.pubxml

<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://localhost:8080/</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>8364e711-8c2c-41e7-a09e-fa7b0b72a60d</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>localhost</MSDeployServiceURL>
<DeployIisAppPath>VehicleMonitoring</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>InProc</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
<EnvironmentName>Production</EnvironmentName>
<UserName>test</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>

MSBuild + Clean + Remove Bin/Obj Folder

September 10, 2018 10:36

Start > Run > CMD (edit)

Xem thêm

http://manhng.com/blog/msbuild/

http://manhng.com/blog/xcopy/

http://manhng.com/blog/appcmd/

http://manhng.com/blog/powershell/

Tiếp tục

https://ss64.com/nt/run.html

https://ss64.com/nt/syntax-windows.html

Microsoft OLE DB Provider for SQL: Using an UDL file

https://blogs.msdn.microsoft.com/farukcelik/2007/12/31/basics-first-udl-test/

https://dougrathbone.com/blog/2013/11/18/testing-connectivity-to-microsoft-sql-server-without-any-tools-installed

ODBC Data Sources

https://weblogs.asp.net/dixin/easy-ways-to-test-sql-server-sql-azure-connection

https://knowhow.visual-paradigm.com/hibernate/solving-sql-server-connection-problem/

Easy way to check connectivity to SQL Server from client

+ Telnet: telnet servername 1433

+ UDL file: Create new TestConnect.udl file and click into TestConnect.udl (Data Link Properties)

Remove ASP.NET Temporary files

C:\WINDOWS\system32>del /q "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\*"

C:\WINDOWS\system32>FOR /D %p IN ("C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\*.*") DO rmdir "%p" /s /q

Remove all Bin, Obj folders

Bin, Obj via command prompt

for /d /r . %d in (bin,obj) do @if exist "%d" rd /s/q "%d"

Bin, Obj via .bat file

for /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d"

Guide

I want to delete all bin and obj folders to force all projects

Deleting all bin obj folders in a solution

Categories

Recent posts