Visual Studio Expand Target Does Not Exist

I get this error when starting an embedded project in Visual Studio 2017:

------ Deploy started: Project: myProj, Configuration: Debug Win32 ------ C:\...\myProj.vcxproj : error MSB4057: The target "Deploy" does not exist in the project. Done building project "myProj.vcxproj" -- FAILED. ========== Deploy: 0 succeeded, 1 failed, 0 skipped ========== 

I found something on the network by unchecking "Deploy from assembly, Configuration Manager ...", but it is no longer installed.

If I try to start it again, it will boot and start. But I would like to be able to release code that works for the first time. What else can I try? TIA.

+5
source share
3 answers

I solved the problem by opening the .sln file of the problematic solution using a text editor. I found the following lines for different configurations there:

{GUID} .Release | x86.Deploy.0 = Release | Win32

After deleting all these lines for different configurations, I no longer got an error.

+2
source

Most likely, in your project there is an event related to sending messages. When you first create it, the post build event fires and tries to deploy. The second time you plan to build a project is already "updated", so it is not built and the post build event does not fire.

You can view your message creation events by right-clicking your project and selecting properties, expanding assembly events, and then expanding post-assembly.

enter image description here

You can also check if something is defined as part of the custom build steps.

+1
source

This worked for me:

  • GOTO "Project Properties Page"
  • Click Project Dependencies
  • Select your main project in "Project:"
  • Add a project dependency that gives you a deployment error.
  • Save ALL
  • Recompile
+1
source

Source: https://habr.com/ru/post/1269539/


All Articles