Visual Studio 2019 với StyleCop (edit)
- Visual Studio 2017 Enterprise
- StyleCop-4.7.55.0.msi
- wix40.exe
- InstallerProjects.vsix
- Microsoft .NET Framework 3.5 + WCF and IIS
- Microsoft SDKs (Windows 10)
- Microsoft SQL Server 2008 R2
Build & Deploy ASP.NET Web API 2 in Visual Studio 2019
+ Create Publish profile (named FolderProfile)
+ Run CMD with Administrator
+ Enter the command:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" "C:\Path\To\AspNetWebApi2.csproj" /p:DeployOnBuild=true /p:PublishProfile=FolderProfile
Microsoft.WebApplication.targets was not found during web application build
Create an Installer
- "C:\Program Files (x86)\WiX Toolset v4.0\bin\WixToolset.Dtf.WindowsInstaller.dll"
- "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe"
- "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe”
- "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools"
- Visual Studio Version = "15.0"
StyleCop
Sửa trong file này: C:\Program Files (x86)\MSBuild\StyleCop\v4.7\StyleCop.Targets
Start > Run > CMD (with Admin) > notepad C:\Program Files (x86)\MSBuild\StyleCop\v4.7\StyleCop.Targets
Sửa đoạn text này: $(MSBuildExtensionsPath)\..\StyleCop 4.7\StyleCop.dll
thành đoạn text này: C:\Program Files (x86)\StyleCop 4.7\StyleCop.dll
How TO
notepad C:\Program Files (x86)\MSBuild\StyleCop\v4.7\StyleCop.Targets
Replace $(MSBuildExtensionsPath)\..\StyleCop 4.7\StyleCop.dll with C:\Program Files (x86)\StyleCop 4.7\StyleCop.dll