APPX0502 Build fail in tfs but work in visual studio 2015 - visual-studio

I had many problems, but this is something that can not be resolved when the TFS makes a compilation fails but works well when the compilation is done from the Visual Studio 2015.
I have installed: TFS 2015.
Error:
(1736,5): Error APPX0502: File 'C:\Program Files %28x86%29\Windows
Kits\10\Include\WinRT\AppxManifestSchema2010_v2.xsd' not found.
I hope someone can help me.

I resolved this on my Dev Machine by copying 2 files from the Win8.1 Kit to the Win10 kit folders
Source:
"C:\Program Files
(x86)\Windows Kits\8.1\Include\winrt\AppxManifestSchema2010_v2.xsd"
"C:\Program Files (x86)\Windows
Kits\8.1\Include\winrt\AppxManifestSchema2013.xsd"
Target:
"C:\Program Files (x86)\Windows
Kits\10\Include\winrt\AppxManifestSchema2010_v2.xsd"
"C:\Program
Files (x86)\Windows Kits\10\Include\winrt\AppxManifestSchema2013.xsd"
No idea how legit this is, or why it it needed for building from MSBuild when you can build fine in VS.

Related

Cannot open file 'pgort.llib' after adding /GENPROFILE flag

I'm trying to follow the instructions here to add PGO for my project. After I added the /GENPROFILE flag, I start getting the link error:
LINK : fatal error LNK1104: cannot open file 'pgort.lib'
After debugging it a bit, I believe the problem is that my Library Directories (found under VC++ Directories tab) has a value of $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) which is evaluating to:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\lib\spectre\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\atlmfc\lib\spectre\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\lib\x64
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\UnitTest\lib
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\lib\um\x64
It looks like the .\spectre\x64 paths don't have the pgort.lib library, but the non-spectre path does:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\lib\x64
What do I do to fix this? I find it hard to believe that if I'm using the spectre binaries (which I am not even sure how/why I am in the first place) that I can't optimize my project.
BTW, I tried this on a machine with Enterprise VS installed and it's the same. So this isn't specific to Community edition.
I ended up updating my build configuration/scripts to dynamically update the LibraryPath to add the appropriate, architecture-specific version of $(VC_LibraryPath_VC_x64_Desktop) when compiling for PGO.

VS2017: “Cannot find the resource compiler DLL. Please make sure the path is correct.”

I am using Visual Studio 2017. When I try to build a solution, I encounter this error:
Cannot find the resource compiler DLL. Please make sure the path is correct.
I checked my system, and found that the v7.0, v8.0, v8.0A, v8.1A, and v10.0A SDKs are installed on my machine. I checked my project properties, and the default SDK is v8.0
Me too, i have only the "windows 10 sdk version 10.0.15063.0" installed, and solved after:
Copy rddll.dll from:
c:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\rcdll.dll
to:
c:\Program Files (x86)\Windows Kits\10\bin\x86\
ref link: https://developercommunity.visualstudio.com/content/problem/43024/ide-cannot-find-the-resource-compiler-dll-rcdlldll.html
Just a temporary workaround, but it works.
Edit:
Run Visual Studio Installer from start menu, and click Update, after a while it's done, all thing worked.
it's doesn't need to copy file any more.
you could copy from
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\rcdll.dll
to
C:\Program Files (x86)\Windows Kits\10\bin\x64\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\x64\rcdll.dll
and copy from
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\rcdll.dll
to
C:\Program Files (x86)\Windows Kits\10\bin\x86\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\x86\rcdll.dll
The reason is that Visual Studio cannot find the requested files.
You have to (re)install or repair the requested version through Visual Studio Installer.
You can reach that through Visual Studio menu bar -> Tools -> Get Tools and Features -> Individual Components -> find and tick the respective {version} tools to install and then click "Modify".
It should work after that. Best of luck.
you can just simply change the compiler from resource compiler to C / C++ Compiler and you can do that by simply making a resource and you will face that error, after that right click the empty resource that have been generated and on the folder of resources right click the [nameofyourproject].rc and then choose properties and from item type change it to C / C++ Compiler and then delete that resource and create a new one and you will find it works fine with you.

Visual Studio 2017 msbuild package sharepoint

I have a simple SharePoint 2013 solution which I can publish through Visual Studio - this will generate .wsp for me. However when I am trying to run build by the command:
msbuild /t:Package mySolution.sln
Build is ok but during packaging I receive an error:
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(190,5): error : Could not load file or assembly
'Microsoft.VisualStudio.Modeling.Sdk.15.0, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.
If I put this missing dll to C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\SharePointTools then I receive another error about another missing dll...
What am I doing wrong?
Looks like this is MSBuild issue:
1.Open elevated command prompt
2.Navigate to your SDK tools
cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64"
Sn -Vr "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.Modeling.Sdk.15.0.dll"
gacutil /i "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.Modeling.Sdk.15.0.dll"
For the following three dlls, please do same behavior from step 3 to 4
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.SharePoint.dll
Note if Microsoft.VisualStudio.SharePoint.dll not found in above path, check in
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\SharePointTools\Microsoft.VisualStudio.SharePoint.dll
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.SharePoint.Designers.Models.dll
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.SharePoint.Designers.Models.Features.dll
Now you can MSBuild your SharePoint 2016 solutions by VS command promp.
Check Link, that's for Sharepoint 2016, but same works for 2013 as well: https://developercommunity.visualstudio.com/content/problem/40195/cant-use-msbuild-to-package-sharepoint-2016-soluti.html

VS2012 doesn't include winres.h any more?

After installing VS2012, I can't find winres.h under folder "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC". What happen to VS2012 and why remove this header file?
By the way, in VS2010, winres.h locates in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include"
The file is part of the Windows SDK now and since VS2012 the SDK location is different, it's now called a 'Kit' and is found in Program Files/Windows Kits. Sepcifically you can find winres.h in
C:\Program Files (x86)\Windows Kits\8.0\Include\um

How do I fix the "Prerequisite cannot be found for bootstrapping" warning in Visual Studio 2010?

I am using:
Visual Studio 2010 on a x64 machine
Building a Windows Application
Targeting .NET Framework 4 Client Profile and x86.
I am deploying with ClickOnce.
I have installed the "Microsoft Windows SDK for Windows 7 (7.1)".
Here is my problem:
On an old project, on the project properties, Publish tab, Prerequisites... button, I open this dialog box. All the listed prerequisites have a yellow, triangular warning, stating, "Prerequisite cannot be found for bootstrapping". The effect is that the ClickOnce setup.exe cannot correctly install the prerequisites for users.
If I create a new, empty project from scratch, the Prerequisites box is empty.
Here is information about various folders:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages contains all the bootstrap packages.
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages contains all the bootstrap packages.
C:\Program Files\Microsoft SDKs\Windows\v7.1 did not have a Bootstrapper folder.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\SDK that has nothing in it but an empty v3.5 folder .
Environment WindowsSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\
Registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\GenericBootstrapper\4.0\Path = C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
Here is what I have tried:
I have tried copying the Bootstrapper folder from C:\Program Files\Microsoft SDKs\Windows\v7.0A\ to C:\Program Files\Microsoft SDKs\Windows\v7.1 but that did not make a difference.
I have tried copying the Bootstrapper folder from C:\Program Files\Microsoft SDKs\Windows\v7.0A\ to C:\Program Files (x86)\Microsoft Visual Studio 10.0\SDK\v4.0. That did not make a difference.
Any suggestions?
Try this:
make the prerequisites with bootstrapper manifest generator
then add them into C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\Bootstrapper\Packages folder
If it works please notify by comment..

Resources