Skip to content

Roslyn binaries not copied properly on publish in 1.0.6 #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
onyxmaster opened this issue Aug 6, 2017 · 59 comments
Closed

Roslyn binaries not copied properly on publish in 1.0.6 #13

onyxmaster opened this issue Aug 6, 2017 · 59 comments
Assignees
Labels

Comments

@onyxmaster
Copy link

onyxmaster commented Aug 6, 2017

Using web publish from VS 2015 fails with the following:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p <snip>\obj\Release\AspnetCompileMerge\Source -c -d <snip>\obj\Release\AspnetCompileMerge\TempBuildDir 
ASPNETCOMPILER(0,0): Error ASPRUNTIME: Could not find a part of the path '<snip>\obj\Release\AspnetCompileMerge\Source\bin\roslyn\csc.exe'.

Rolling back to 1.0.5 works.
I believe that the fix for #2 broke the web publish scenario at least with VS 2015.

This is a local path web publish with the following settings:

<PackageAsSingleFile>false</PackageAsSingleFile>
<PrecompileBeforePublish>true</PrecompileBeforePublish>
<ExcludeGeneratedDebugSymbol>false</ExcludeGeneratedDebugSymbol>
<UseMerge>true</UseMerge>
<WDPMergeOption>MergeAllOutputsToASingleAssembly</WDPMergeOption>
<EnableUpdateable>false</EnableUpdateable>
@ThomasPrioul
Copy link

I have experienced problems too with 1.0.6 on a full .NET app using Roslyn compiler for scripting purposes.
The roslyn binaries get copied to "D:\bin" instead of "D:\Path\To\Project\Output\bin\roslyn"...
Took me a while to figure out where they were copied to.

@Jinhuafei Jinhuafei added the bug label Aug 7, 2017
@Jinhuafei Jinhuafei self-assigned this Aug 7, 2017
@Jinhuafei
Copy link
Contributor

Thanks for reporting the issue. I'll take a look.

@Jinhuafei
Copy link
Contributor

Sent PR 14

@KarlZ
Copy link

KarlZ commented Aug 9, 2017

@onyxmaster You're picture made my day... To me it looks like an expression of, "Come'on, REALLY?" (Which is certainly how I feel now...)

@nicholasyin
Copy link

Had the same issue. Downgrading to 1.0.5 works. thanks guys.

@ghost
Copy link

ghost commented Aug 13, 2017

Having the same problem, in vs 2017, downgrading to 1.0.5 works

@Talegen
Copy link

Talegen commented Aug 14, 2017

whatever this issue is, it has totally hosed our build. Even after rolling back to 1.0.5, I still get an error about not being able to find 1.0.6 assembly.

Edit: My problem was I didn't have web.config checked in so it was still seeing 1.0.6. Running build now to test theory. Seriously though Jinhuafei needs to run his code through multiple environments.

@vdevappa
Copy link

I have seen issues where on the build server, for some reason unless you delete the downloaded source code, it keeps old files. Delete manually and then try to rebuild again.

@Talegen
Copy link

Talegen commented Aug 14, 2017

Yeah, it was the web.config that was the hold up. Roll back to 1.0.5 does work for me now. VS2k15u3

@ricardag
Copy link

Happens here with VS2017 15.2 (26430.16) Release when publishing to file, and "Precompile during publishing" is checked. If we uncheck this option, the publish succeeds.

Not on all publishing, just some profiles. And deleting/recreating profile doesn't helps.

@TheDestinyGroup
Copy link

Hi,

I had started a question on this last week over on Stack Overflow.

It can be found at:

https://stackoverflow.com/questions/45538776/v1-0-6-of-microsoft-codedom-providers-dotnetcompilerplatform/

Rohit submitted an answer to my question with a work-around.

The issue appears to lie with the Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props file in the build\net45 directory.

Hopefully the developers can work out why the changes they've made in this release related to how the RoslyCompilerFiles are copied don't appear to be working in VS2015 or VS2017.

Les

@Jinhuafei
Copy link
Contributor

@TheDestinyGroup If you can't wait for the new release, you can copy the CS in this PR to workaround the issue for now.

HongGit added a commit that referenced this issue Aug 16, 2017
@sherif-elmetainy
Copy link

Had same problem. Downgrading to 1.0.5 worked.

@ScottRFrost
Copy link

Same issue here. .csproj created in VS2017 that had never touched VS2015. Like others, uninstalling and then installing 1.0.5 worked.

1.0.6 should probably be pulled from nuget.

@IvanAlekseev
Copy link

We have the same issue with 1.0.7.
1.0.5 works fine

@Jinhuafei
Copy link
Contributor

@IvanAlekseev can you give us more details? We tested 1.0.7 version with all the publishing scenarios in VS and didn't see any issue.

@erincerol
Copy link

@Jinhuafei We have used via VSTS App Service Publish and Azure App Service GitHub deployment. Both have the same issue.

@Jinhuafei
Copy link
Contributor

@erincerol thanks. I'll take a look.

@RyanCEI
Copy link

RyanCEI commented Aug 17, 2017

FWIW I had exactly the same problem using VS Azure Publish. I uninstalled 1.0.5 directly then installed 1.0.7 clean back into the project and it fixed the problem. When I upgraded the package from 1.0.5 to 1.0.7 it failed.

I don't think it's the publish method but rather the copying of the compiler into the publish directory that is failing. Runs fine locally even if the pub is broken. I have diff's of my csproj, packages.config and web.config that I can DM you if you like. I can also roll back and reproduce the problem exactly if you have an update you'd like to test.

@antisniperspy
Copy link

1.0.7 Fixed the issue for me in team services. Thanks

@Jinhuafei
Copy link
Contributor

I opened a new issue to track the publish issues that 1.0.7 release doesn't fix.

@titobf
Copy link

titobf commented Aug 17, 2017

1.0.7 worked for me when publishing to azure using web deploy

@knopa
Copy link

knopa commented Aug 21, 2017

had same issue with teamcity and octopus on 1.0.7

@Airn5475
Copy link

I rolled back from v1.0.7 to v1.0.6 and it worked fine.
I also tried uninstalling it altogether and fresh installing v1.0.7 and that worked as well.

@mobius127
Copy link

@Jinhuafei Here

Build started 30/08/2017 14:43:19.
Overriding target "GetFrameworkPaths" in project "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets" with target "GetFrameworkPaths" from project "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.NetFramework.CurrentVersion.targets".
Overriding target "SatelliteDllsProjectOutputGroup" in project "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets" with target "SatelliteDllsProjectOutputGroup" from project "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets".
The target "MvcBuildViews" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets (852,131)" does not exist in the project, and will be ignored.
Project "D:\Users\fcgonzal\Documents\Visual Studio 2015\Projects\TestToken\WebApiToken\WebApiToken.csproj" on node 1 (go target(s)).
Building with tools version "14.0".
Project file contains ToolsVersion="4.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="14.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=293424.
Target "ValidateMSBuildToolsVersion" skipped, due to false condition; ('$(BuildingProject)' == 'true') was evaluated as ('false' == 'true').
Target "_CheckForInvalidConfigurationAndPlatform" in file "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets" from project "D:\Users\fcgonzal\Documents\Visual Studio 2015\Projects\TestToken\WebApiToken\WebApiToken.csproj" (entry point):
Set Property: _InvalidConfigurationMessageText=The OutputPath property is not set for project 'WebApiToken.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'.
Set Property: _InvalidConfigurationMessageText=The OutputPath property is not set for project 'WebApiToken.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ).
Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ).
Using "Message" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Message"
Task Parameter:Text=Configuration=Debug
Task Parameter:Importance=Low
Configuration=Debug
Done executing task "Message".
Task "Message"
Task Parameter:Text=Platform=AnyCPU
Task Parameter:Importance=Low
Platform=AnyCPU
Done executing task "Message".
Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('bin' != '' and !HasTrailingSlash('bin')).
Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('obj' != '' and !HasTrailingSlash('obj')).
Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('obj\Debug' != '' and !HasTrailingSlash('obj\Debug')).
Done building target "_CheckForInvalidConfigurationAndPlatform" in project "WebApiToken.csproj".
D:\Users\fcgonzal\Documents\Visual Studio 2015\Projects\TestToken\WebApiToken\WebApiToken.csproj : error MSB4057: The target "go" does not exist in the project.
Done Building Project "D:\Users\fcgonzal\Documents\Visual Studio 2015\Projects\TestToken\WebApiToken\WebApiToken.csproj" (go target(s)) -- FAILED.

Deferred Messages

Detailed Build Summary

============================== Build Hierarchy (IDs represent configurations) =====================================================
Id : Exclusive Time Total Time Path (Targets)

0 : 0.347s 0.347s D:\Users\fcgonzal\Documents\Visual Studio 2015\Projects\TestToken\WebApiToken\WebApiToken.csproj (go)

============================== Node Utilization (IDs represent configurations) ====================================================
Timestamp: 1 Duration Cumulative

636396937991484595: 0 0,346s 0,346s ######

Utilization: 100,0 Average Utilization: 100,0

Build FAILED.

"D:\Users\fcgonzal\Documents\Visual Studio 2015\Projects\TestToken\WebApiToken\WebApiToken.csproj" (go target) (1) ->
D:\Users\fcgonzal\Documents\Visual Studio 2015\Projects\TestToken\WebApiToken\WebApiToken.csproj : error MSB4057: The target "go" does not exist in the project.

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.38

@Jinhuafei
Copy link
Contributor

@mobius127 from the error message "The target "go" does not exist in the project.", it doesn't seem related to the DotNetCompilerPlatform nupkg.

@mobius127
Copy link

@Jinhuafei but when I'm trying to publish in Azure my web application, fails because of it

@Jinhuafei
Copy link
Contributor

@mobius127 if you uninstall DotNetCompilerPlatform, are you able to publish your app to Azure?

@BobbyCannon
Copy link

Uninstalling 1.0.7 then reinstall 1.0.7 will publish the assemblies but only once. The next publish will not publish them. This is using a local file path publish.

@BobbyCannon
Copy link

BobbyCannon commented Sep 1, 2017

There's two ways to get it to deploy. Seems switching publish profiles forces it to redeploy, however if you do a publish profile that has the "deletes all files" flag and deploy twice, the roslyn folder only is there on first deploy. It's not there any other deploys after. If you clean the site it will also redeploy without having to switch publish profiles. Rebuild will not work but clean will.

@BobbyCannon
Copy link

My guess is many people may not being seeing this issue if they do not publish with "delete existing files" flag turned on. A temporary work around is to just uncheck "delete existing files" when working locally.

@Jinhuafei
Copy link
Contributor

@BobbyCannon thanks for the repro. I was able to repro the issue by publishing twice. The second publish doesn't build the project(nothing changed in the project), hence the copy rolsyn files task is not executed. Will look into a fix.

@ttrevorr
Copy link

ttrevorr commented Sep 5, 2017

Can we re-open this issue? Or create a new issue to track this since it clearly isnt fixed?

BTW I have the same issues with 1.0.7 with Teamcity and Octopus.

@Jinhuafei
Copy link
Contributor

Jinhuafei commented Sep 6, 2017

@ttrevorr we are tracking the publish related issue through issue #17

@akash3456
Copy link

Is there a workaround on this issue besides copying and pasting the roslyn folder into the bin, i have tried using the version 1.0.5 of the dom compiler and have also set csc.exe as environment variable, however i checked through MSBuild im using c#5 i thought this could be the answer.

@Jinhuafei
Copy link
Contributor

@akash3456 would you please elaborate your issue? Are you talking about compiling the code behind file? Do you install RoslynCodeDomProvider nupkg in your project?

@akash3456
Copy link

akash3456 commented Sep 27, 2017 via email

@mac2000
Copy link

mac2000 commented Sep 28, 2017

Can confirm also, at moment fighting with TeamCity and OctoPack, reverting package to 1.0.5 gives me roslyn folder inside bin, 1.0.7 - roslyn is missing.

@brgrz
Copy link

brgrz commented Oct 26, 2017

Seems fixed with 1.0.8 because with 1.0.7 and our TFSs build the /bin/roslyn folder was always missing after builds, now it is there.

@willbush
Copy link

Seems to me every version after 1.0.5 does not copy roslyn into the bin folder even on a new simple console application. It work for me in 1.0.5, but it has the bug that was fixed in 1.0.6 with the hard coded path.

@willbush
Copy link

willbush commented Oct 28, 2017

@mac2000 Turns out if your project file does not define the variable "WebProjectOutputDir" it will fail to copy Roslyn over and it continues on error.

See the issue I opened: #21

@RickStrahl
Copy link

Running into this issue in non-Web projects as well. WPF app in this case, same problem with 1.08. Reverting to 1.05 works.

@willbush
Copy link

@RickStrahl see my previous comment and referenced issue. Adding "WebProjectOutputDir" variable to our csproj file worked in our WPF app.

@akash3456
Copy link

akash3456 commented Nov 11, 2017 via email

@willbush
Copy link

@akash3456 Yes it will work, but it's a bit hacky.

@akash3456
Copy link

akash3456 commented Nov 11, 2017 via email

@aliostad
Copy link

aliostad commented Jan 18, 2018

Upgrading from 1.0.7 to 1.0.8 solved it for me:

Update-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform

@Rzpeg
Copy link

Rzpeg commented Feb 22, 2018

Upgrading to 1.0.8 hasn't solved the issue. We are using the "PackageReference" Nuget format.
MVC5, Target 4.6.1, "Remove Additional Files at destination" is checked.

@timmkrause
Copy link

Having the same issue on TeamCity. If I run the publish profile locally roslyn is missing. The proejct uses the "classic" .csproj (non-SDK) format and PackageReferences with ToolsVersion="15.0".

What I have removed when upgrading to PackageReferences was

<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" /> 
<Import Project="..\packages\Microsoft.Net.Compilers.2.6.1\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.2.6.1\build\Microsoft.Net.Compilers.props')" /> 

because from my understanding it is not required anymore and with PackageReferences the path to ..\packages is not correct anymore anyway.

Any new insights on how to solve this? Why is TeamCity behaving differently...

@Jinhuafei
Copy link
Contributor

@Rzpeg @timmkrause can you provide msbuild log?

@timmkrause
Copy link

@Jinhuafei I am sorry but unfortunately I am not allowed to do so...

What came to my mind while reading the log was that the last build step which builds the project with /p:DeployOnBuild=true and a publish profile (executes MSDeploy) does the following before copying other files:

[12:26:02] :			 [CopyAllFilesToSingleFolderForMsdeploy] Delete
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\csc.exe".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\csc.exe.config".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\csc.rsp".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\csi.exe".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\csi.exe.config".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\csi.rsp".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.CSharp.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.CSharp.Scripting.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.Scripting.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.CodeAnalysis.VisualBasic.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.CSharp.Core.targets".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.DiaSymReader.Native.amd64.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.DiaSymReader.Native.x86.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.VisualBasic.Core.targets".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\Microsoft.Win32.Primitives.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.AppContext.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Collections.Immutable.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Console.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Diagnostics.FileVersionInfo.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Diagnostics.Process.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Diagnostics.StackTrace.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.IO.Compression.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.IO.FileSystem.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.IO.FileSystem.DriveInfo.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.IO.FileSystem.Primitives.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.IO.Pipes.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Reflection.Metadata.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Security.AccessControl.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Security.Claims.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Security.Cryptography.Algorithms.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Security.Cryptography.Encoding.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Security.Cryptography.Primitives.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Security.Cryptography.X509Certificates.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Security.Principal.Windows.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Text.Encoding.CodePages.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Threading.Thread.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.ValueTuple.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Xml.ReaderWriter.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Xml.XmlDocument.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Xml.XPath.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\System.Xml.XPath.XDocument.dll".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\vbc.exe".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\vbc.exe.config".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\vbc.rsp".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\VBCSCompiler.exe".
[12:26:02] :				 [Delete] Deleting file "obj\Integration\Package\PackageTmp\bin\roslyn\VBCSCompiler.exe.config".

I fixed it now via a {projectName}.wpp.targets with the following content which explicitly copies the Roslyn files and deploys them:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Target Name="CustomCollectFiles" BeforeTargets="CopyAllFilesToSingleFolderForPackage;CopyAllFilesToSingleFolderForMsdeploy">
    <ItemGroup>
      <RoslynFiles Include="bin/roslyn/*.*"/>
      <FilesForPackagingFromProject Include="%(RoslynFiles.Identity);">
        <DestinationRelativePath>%(RelativeDir)%(Filename)%(Extension)</DestinationRelativePath>
      </FilesForPackagingFromProject>
    </ItemGroup>
  </Target>
</Project>

I know this is a bit hacky but I need to make progress. Will keep an eye on this issue for a better solution.

@dmarlow
Copy link

dmarlow commented Apr 11, 2019

Ran into this with /p:DeployOnBuild=true and a publish profile. Not too keen on using the hack (how is that even referenced anyways?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests