MSBuild error when specifying PublishProfile for ASP.NET.Core project -


i have asp.net core 1.1.2 project targeting .net framework 4.6.2. installed latest version of visual studio (15.2 26430.16), , can't build project using msbuild version 15.1.1012.6693. error occurs when using publishprofile.

the msbuild command is:

msbuild d:\project\project.csproj /p:deployonbuild=true /p:publishprofile=dist

and error is:

c:\program files (x86)\microsoft visual studio\2017\enterprise\msbuild\sdks\microsoft.net.sdk.publish\build\netstandard1.0\transformtargets\microsoft.net.sdk.publish.transformfiles.targets(54,5): error msb4062: "transformwebconfig" task not loaded assembly c:\program files (x86)\microsoft visual studio\2017\enterprise\msbuild\sdks\microsoft.net.sdk.publish\build\netstandard1.0\..\..\tools\net46\\microsoft.net.sdk.publish.tasks.dll. not load file or assembly 'file:///c:\program files (x86)\microsoft visual studio\2017\enterprise\msbuild\sdks\microsoft.net.sdk.publish\tools\net46\microsoft.net.sdk.publish.tasks.dll' or 1 of dependencies. attempt made load program incorrect format. confirm <usingtask> declaration correct, assembly , dependencies available, , task contains public class implements microsoft.build.framework.itask. [d:\project\project.csproj]

it works when not specifying publish profile. when publishing project visual studio, works expected.

this known bug of tooling when building using 64 bit msbuild version (build server, command line). see this github issue details.

since issue has been fixed, need upgrade recently released 15.3.* versions of visual studio / msbuild , 2.0.0 version of .net core sdk.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -