0

I migrated an asp.net web site application from Visual Studio 2010 in .NET 4.0 to Visual Studio 2013 with .NET 4.5.2.

When the website is published in Visual Studio 2013, it is not generating any application dll or compiled file in bin folder, but it is getting published properly in Visual Studio 2010.

I tried publishing the website in command using aspnet_compiler.exe with option -errorstack. It is getting complied successfully without throwing any error or output in bin folder.

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /website -p C:\WebsitePhysicalPath -c -errorstack C:\targetDir

Any help on this is highly appreciated.

Amit
  • 113
  • 1
  • 9
  • When you publish in Visual Studio 2013 what does the Output window show? If the publish was successful it should end with something like this: `========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Publish: 1 succeeded, 0 failed, 0 skipped ==========` – DigitalDan Feb 22 '16 at 16:54

1 Answers1

0

You should use msbuild before aspnet compiler

 C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe C:\Projects\testPublish\testPublish.csproj  /p:DeployOnBuild=true /property:Configuration=Release
 if exist "C:\PublishDirectory" rd /q /s "C:\PublishDirectory"
 C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p C:\Projects\testPublish\obj\Release\Package\PackageTmp -c C:\PublishDirectory
 cd C:\PublishDirectory\bin
 del *.xml
 del *.pdb