-
Notifications
You must be signed in to change notification settings - Fork 121
VS2017 RC - The target “GetCopyToPublishDirectoryItems” does not exist in the project. #869
Comments
I have exactly the same problem. btw, "GetCopyToPublishDirectoryItems" is defined over there: https://github.com/dotnet/sdk/blob/master/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Publish.targets Maybe @eerhardt knows something about that? Is there a workaround? I'm trying to port my project to .csproj, but this blocks me. |
I tried workaround to add empty target to referenced class library project: I tried to find a workaround by overriding some targets. After few hours I gave up and I converted project to standard .NET Framework Console Application.
If you use different configuration in development environment, I added command line argument for debug project -AspNetCore:Environment=Development, then in Program.Main method I transformed this command line arguments to environment variable ASPNETCORE_ENVIRONMENT. If you use User Secrets, then add into .csproj file element |
And I forgot to set Copy to Output Directory for files web.config and appsettings.json. My project is just WebAPI, so no .cshtml file. So it's easy. |
This issue doesn't appear to have gotten any attention yet. Does anymore know why it happens? I'm trying to find a workaround without having to hack up my project file. |
@hybridview Rolling back to WebAPI2 was the best solution I have done so far. |
Sorry, I've been on vacation and haven't been checking email or GitHub. I just saw this now. The problem is that one project uses the new Microsoft.NET.Sdk project system and the referenced class library project doesn't use the same project system. As a workaround, I can think of the following options:
@srivatsn - Is it a supported scenario to mix and match these different project systems across P2P references? |
Yes this is supported. Either we dummy out GetCopyToPublishDirectoryItems or sniff that the target doesn't exist (not sure this is even possible)? |
Yes referencing an existing project from a new one is supported. |
I have the same problem with Service Fabric, Asp.Net Core and VS 2017 RC2. To replicate:
I'd love to see a fix for this, because VS 2017 is awesome.
|
@srivatsn We should move this issue to the dotnet/sdk repo. I don't think we currently have tests that cover building an SDK project which references a non-SDK project, much less publishing in this scenario. |
Having same problem. Would also love to see a fix to this 😅🙏🔥 |
This issue was moved to dotnet/sdk#543 |
After installing Visual Studio 2017 RC, and upgrading my ASP.NET Core Web Application (.NET Framework) project to CSPROJ, I am no longer able to publish my project to the file system. Building the solution works fine, but when I publish I get this error:
To replicate:
The text was updated successfully, but these errors were encountered: