vscode-azurefunctions icon indicating copy to clipboard operation
vscode-azurefunctions copied to clipboard

Deployment fails on .NET SDK 6.0.200

Open tymtam2 opened this issue 3 years ago • 2 comments

After updating .NET SDK to 6.0.200 "Deploy to Function App..." fails with:

C:\Program Files\dotnet\sdk\6.0.200\Microsoft.Common.CurrentVersion.targets(4650,5): error MSB3883: Unexpected exception:  [C:\git\x\project1\project1.csproj]
C:\Program Files\dotnet\sdk\6.0.200\Microsoft.Common.CurrentVersion.targets(4650,5): error : DirectoryNotFoundException: Could not find a part of the path 'C:\git\x\project1\bin\Release\net6.0\ref\project1.dll'. [C:\git\x\project1\project1.csproj]

The files are in C:\git\x\project1\bin\Release\net6.0\ but not in C:\git\x\project1\bin\Release\net6.0\ref

I believe this is because of this braking change:

Write reference assemblies to intermediate output

Workaround

As shown in Write reference assemblies to intermediate output set ProduceReferenceAssemblyInOutDir in project file.

  <PropertyGroup>
    <ProduceReferenceAssemblyInOutDir>true</ProduceReferenceAssemblyInOutDir>
  </PropertyGroup>

tymtam2 avatar Feb 23 '22 06:02 tymtam2

Hi @tymtam2

I was investigating this and tried deploying with .NET v6.0.106. It seemed to deploy and execute triggers. Is this still an ongoing issue?

nturinski avatar Jul 07 '22 22:07 nturinski

@nturinski Hey, thanks for looking into this. The issue started happening on 6.0.200 and I don't think deploying on 6.0.106 will reproduce it.

My solution was the workaround <ProduceReferenceAssemblyInOutDir>true</ProduceReferenceAssemblyInOutDir>.

Could we agree that once you cannot reproduce it .200 then I remove the workaround and try again?

tymtam2 avatar Jul 14 '22 01:07 tymtam2