Getting "error MSB3030: Could not copy the file" when no Copy is provided in project - visual-studio

After migrating project from Visual Studio 2015 to Visual Studio 2015 I started to get the following error:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4358,5): error MSB3030: Could not copy the file "C:\p4client\ProAudio\dev_main_2018\ProAudio\XPlatform\AudioGrid\sdk\Project\Win\ag_sgring.pb.cc ag_sgring_pb2.py" because it was not found.
However, in no place in project copy step was not specified.
How can I find out what is asking this copy step and disable it?
Was there any change between VS 2015 and VS 20017 in copy tasks?

Related

No visual studio installed but programData/package cache is filling up with files

How can I prevent files from being created in programData/package.
I do not have visual studio installed but programData/package cache is filling up with files.
I checked and found that I should not delete those files but I'm not sure why I am getting those files if there is no Visual Studio installed.
I tried this command "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" --nocache
This fails as there is no visual studio.
How do I get rid of these files?

DotNet\Microsoft.DotNet.Props" was not found

I have a project .sln which i want to build inside Visual studio community 2019, but when i do so , i get this error:-
Severity Code Description Project File Line Suppression State
Error MSB4226 The imported project "C:\Program Files (x86)\Microsoft
Visual
Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\DotNet\Microsoft.DotNet.Props"
was not found. Also, tried to find "DotNet\Microsoft.DotNet.Props" in
the fallback search path(s) for $(VSToolsPath) - "C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v16.0" . These search paths are
defined in "C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe.Config". Confirm
that the path in the declaration is correct, and that the
file exists on disk in one of the search
paths. C:\c\tree\master\cloud\src\Helper
Utilities\Microsoft.Legal.MatterCenter.HelperUtilities\Microsoft.Legal.MatterCenter.HelperUtilities.sln C:\c\tree\master\cloud\src\Helper
Utilities\Microsoft.Legal.MatterCenter.HelperUtilities\Microsoft.Legal.ProjectCenter.UpdateProjectName\Microsoft.Legal.ProjectCenter.UpdateProjectName.xproj 8
Although i have installed .net core SDK, and i have this version for it:-
C:\WINDOWS\system32>dotnet --version
6.0.301
so why i am getting this error?

Ionic / Cordova Windows build picking up incorrect MSBUILD path

I have had to do a few update of Visual Studio on my Windows 10 machine (after some licensing issues).
I use to have Visual Studio Enterprise 2017, which I uninstalled. I now have Visual Studio Professional 2017, and Studio Enterprise 2019 (which I recently installed). I also installed Visual Studio Build Tools 2019 (2).
Now, when I try to build my Ionic project via the command I have always used...
ionic cordova build windows --prod --release -- --archs="x86 x64 arm" --buildConfig=platform_build_files\\windows\\build.config
I now get the error...
Building project: D:\dev\myapp\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : release
Platform : x86
Buildflags : /p:AppxBundle=Never,/p:UapAppxPackageBuildMode=StoreUpload
MSBuildTools : C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin
buildProject spawn: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild [ 'D:\\dev\\myapp\\platforms\\windows\\CordovaApp.Windows10.jsproj', '/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
'/nologo',
'/p:Configuration=release',
'/p:Platform=x86',
'/p:AppxBundle=Never',
'/p:UapAppxPackageBuildMode=StoreUpload' ] { stdio: 'inherit' }
The system cannot find the path specified.
No valid MSBuild was detected for the selected target: Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild: Command failed with exit code ENOENT
Of course I no longer have a folder C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise as I uninstalled it.
I have removed and readded the windows platform for my Ionic app, but this did not help.
Also, I am not sure if this is related, but when I try to open the CordovaApp.sln in Visual Studio 2019, I get the following...
Not sure if related.
My question is, how can I reset this MSBuild path? I cannot see any environmental variables anywhere for this, I just can't get rid of this old path
Edit 1
I added the env var as suggested:
Opened a new command prompt, but it is still looking for the non-existent path
No valid MSBuild was detected for the selected target: Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild: Command failed with exit code ENOENT
In Visual Studio 2019, creating UWP apps using Javascript is no longer supported, if you want to build UWP apps using web technologies like Cordova. You need to use Visual Studio 2017.
My question is, how can I reset this MSBuild path?
Visual Studio will choose the version of MSBuild without explicit settings, but you can change this by setting environment variables.
Please add the path of MSBuild to the system environment variable, like:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
Best regards.

Package management initialization failed. When launching Visual Studio 2017 (15.7.2)

After installing VS2017 Community ver. 15.7.2 on Win 7 64-bit, following error was found when launching VS2017 with or without admin privilage:
Package management initialization failed.
You can get more information by examining the file:
C:\Users\NAME\Appdata\Roaming\Microsoft\VisualStudio\15.0_5024a39e\ActivityLog.xml
These are the errors found in ActivityLog.xml file:
Infos: Could not find ConfigurationChanged timestamp.
Error: merging configuration file C:\Users\\AppData\Local\Microsoft\VisualStudio\15.0_5024a39e\devenv.exe.config
Error: merging configuration file
C:\Users\NAME\AppData\Local\Temp\dev6FC4.tmp
Error: merging configuration file
C:\Users\NAME\AppData\Local\Temp\dev6FC5.tmp
Error: merging configuration file
C:\Users\NAME\AppData\Local\Temp\dev6FC6.tmp
Error: Configuration file merge failed.
Error: Failure calling FinishInitialize.
Tried to install VS2017 Enterprise as well as the VS2017 Community 15.6.7 and got the same errors.
There is a similar problem answered here but it doesn't work for me.
Any input is appreciated
I had the same problem, i solve that doing this
Uninstall Visual Studio 2017 and other Visual Studios
Delete C:\ProgramData\Microsoft\VisualStudio
Uninstall any Visual C++
Look for any Visual Studio Key on the Regedit and delete
Delete C:\Users\UserName\Documents\Visual Studio 2017 (Backup your projects)
Delete C:\Users\UserName\AppData\Local\Microsoft\Visual Studio\15.##
Update your Windows and restart your pc
Install Visual Studio 2017 again
Try to open, and one error apears
Copy the devenv.exe.config file locate in the root of the IdE to
C:\Users\UserName\AppData\Local\Microsoft\Visual Studio\15.##
Try to open again
Try to open in safe mode
Try devenv.exe /resetSettings
Try to repair Visual Studio Again
For me works :) !

How to build SCOM 2012 management pack using msbuild?

I have a Visual Studio project which I'm building with Visual Studio and everything works fine. When I'm trying to build it using msbuild.exe /t:Build F:\BuildSource\SCOMManagementPacks\2012\Packs.sln I'm getting the following errors:
C:\Program Files (x86)\MSBuild\Microsoft\VSAC\Microsoft.SystemCenter.OperationsManager.targets(223,5): error MSB4018: T
he "VerifyManagementPackFragment" task failed unexpectedly.\r [F:\BuildSource\SCOMManagementPacks\2012\Zabbix.Linux.
Library\Zabbix.Linux.Library.mpproj]
C:\Program Files (x86)\MSBuild\Microsoft\VSAC\Microsoft.SystemCenter.OperationsManager.targets(223,5): error MSB4018: System.IO.FileNotFoundException: Could not find file 'F:\BuildSource\SCOMManagementPacks\2012\Zabbix.Linux.Library\Fr
agmentSchemaOM20.xsd'.\r [F:\BuildSource\SCOMManagementPacks\2012\Zabbix.Linux.Library\Zabbix.Linux.Library.mppro
j]
There's no such file on my original machine where I was building the solution using Visual Studio and everything's building fine.
How can I fix this?

Resources