Closed tmarinov closed 6 years ago
same problem here
2017-05-29T19:56:14.9284644Z ==============================================================================
2017-05-29T19:56:14.9284644Z Task : Command Line
2017-05-29T19:56:14.9284644Z Description : Run a command line with arguments
2017-05-29T19:56:14.9284644Z Version : 1.1.3
2017-05-29T19:56:14.9284644Z Author : Microsoft Corporation
2017-05-29T19:56:14.9284644Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613735)
2017-05-29T19:56:14.9284644Z ==============================================================================
2017-05-29T19:56:14.9294646Z ##[command]dotnet publish -c Release -o d:\a\1\s\dist
2017-05-29T19:56:15.1044806Z Microsoft (R) Build Engine version 15.1.1012.6693
2017-05-29T19:56:15.1044806Z Copyright (C) Microsoft Corporation. All rights reserved.
2017-05-29T19:56:20.2440934Z DemoProject -> d:\a\1\s\DemoProject\bin\Release\DemoProject.dll
2017-05-29T19:56:20.2480935Z C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(4074,5): error MSB3030: Could not copy the file "obj\Release\de\DemoProject.resources.dll" because it was not found. [d:\a\1\s\DemoProject\DemoProject.csproj]
Hmm...
Following setup works :
> dotnet publish -c "Release" -o d:\temp
Microsoft (R) Build Engine version 15.3.117.23532
Copyright (C) Microsoft Corporation. All rights reserved.
DemoProject -> D:\temp\WebApplication1\DemoProject\bin\Release\DemoProject.dll
WebApplication1 -> D:\temp\WebApplication1\WebApplication1\bin\Release\net452\win7-x86\WebApplication1.exe
WebApplication1 -> d:\fff\
But, as soon i'am adding an additional resource file (Resource.de.resx) it doesn't work anymore:
> dotnet publish -c "Release" -o d:\temp
Microsoft (R) Build Engine version 15.3.117.23532
Copyright (C) Microsoft Corporation. All rights reserved.
DemoProject -> D:\temp\WebApplication1\DemoProject\bin\Release\DemoProject.dll
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(4078,5): error MSB3030: Could not copy the file "obj\Release\de\DemoProject.resources.dll" because it was not found. [D:\temp\WebApplication1\DemoProject\DemoProject.csproj]
Unfortunately, I can only confirm that the problem still exist with us and currently the continuous integration/deployment pipeline for this project is broken. We need to manually publish the artifacts to the PublishFolder on the build server (by using VS2017) in order to continue with the next steps. Our scenario is with multiple resource files in the project as well.
I also recently encountered this issue with .NET Core SDK 2.0.0. I stumbled across this issue first but it seems like more of a dotnet/MSBuild issue than ASP.NET.
Check out https://github.com/dotnet/cli/issues/6089 instead.
Closing because this appears to be unrelated to ASP.NET Core, so please refer to the .NET CLI issue.
I am creating a build in TFS where I have a command line task Publish which runs the following:
Tool: dotnet Arguments: publish Foo.Api.cproj -c "Release" -f "net461" -r "x86" -o "PublishOuputFolder"
cproj is a dotnet core project, referencing 4.6.1 Framework. It references a legacy Resource library which references 4.6.1 as well.
Everything is migrated to VS2017. dotnet --version -> 1.0.1
If I try to publish the proj by using the above task in TFS build or just run it manually from the command prompt, I am getting the following error:
When I check the project folder, I see that all the *.resource files exist in subfolder ...\Foo.ResourceResourceLibrary\obj\Release\ but no dll files
If I build/publish the project in VS 2017 with the same configuration settings, than it creates folder:
...\Foo.ResourceResourceLibrary\obj**x86**\Release\
where all the dll resource files are created properly, then moved to bin folder and publishing is successful.
But if I use dotnet publish (command line or task in tfs build), it doesn't create the dll files in the intermediate output (obj) folder and the Publish task fails.
Any ideas?