I need to add Visual C++ 2012 Redestribution (x86) as a prerequisite to an installer that I have created using VS 2016. But in order to do that I have to create product.xml along with package.xml in bootsrapper folder. Many posts suggest that to use Bootstrapper Manifest Generator to generate these xml files. But Microsoft has now archived that tool hence I don't have the tool for generating files.
Is there any way that I can make Visual C++ 2012 Redestribution (x86) a prerequisite for my installer?
I've already answered a similar question Add prerequisites to visual studio 2015. But I'll post the answer again in case the other question is deleted or the link will not be available.
I'll explain the step used by me to add Microsoft C++ 2013 x86 into Visual Studio 2015 folder (the steps in your case would be similar).
First navigate to C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\ folder (for previous versions of Visual Studio or custom paths this can be different).
Once located the Packages folder you can start by creating a new folder called vc_redist_2013_x86 (in your case vc_redist_2010_x86).
Download the Redistribution package from Microsoft site and place it in this folder. You can download the 2013 version from here and 2010 x86 from here.
Now copy the files from the vcredist_x86 to your folder (it should be a product.xml file and a en folder with a package.xml file). Now remove them the read-only flag and open in any text editor.
In case of the product.xml you should replace the following:
ProductCode to: "Microsoft.Visual.C++.12.0.x86" (you will have C++.10.0.x86)
PackageFile Name="vcredist_x86.exe" will be named as the executable file that you've downloaded from Microsoft site.
PublicKey needs to be changed according to the one of the exe file. In order to find it you have to do the following steps:
right click the exe-file (in my case vcredist.exe)
choose 'properties'
select 'digital-signatures'
select the top signature (sha1)
press 'Details'
press 'View Certificate'
select 'Details tab'
select 'Public Key'
copy value from below and after removing spaces you have the searched value
MsiProductCheck Product needs to be changed to the one for your version. I was able to find this answer with the desired value. For 2013 x86 your Product is {f65db027-aff3-4070-886a-0d87064aabb1} and for 2010 x86 is {1D5E3C0FEDA1E123187686FED06E995A}.
Save file and move to the package.xml file. Here you have to replace the 'Visual C++ "14"' to your used version. I replaced it with 'Microsoft Visual C++ 2013 Redistributable (x86)'.
Once this steps done. You should be able to see the Microsoft Visual C++ 2013 Redistributable (x86) under the Prerequisites list in your Visual Studio 2015.
I'll post the two files below in case you need a model on which to work on.
Product.xml
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.Visual.C++.12.0.x86">
<!-- Defines list of files to be copied on build -->
<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="vcredist_x86.exe" HomeSite="VCRedistExe" PublicKey="3082010a028201010096715ded0646fa84cb9d5bb746c7b0e1b4113903adb11573609ceba7b66e1a3c3fff65e334f1a6a5215e56996c58e492a10a5cc2d3dc522f0c659a20614053319c6c8f217dbaf9fe13505260953a5bb958a5746141a994e0ad264e4ca1977049275e7c67ca4f1e718446bc1d4bb6e20fc5c627c907e67a0aa51700194c7045382d81b450aac567d1fa79bcc5cca1729bf4253498f854df123938122fa46ba59a7ec762d1dccfed3d34f8b9df3530baec7932a9e1a9ac554d4c7f4c56c3130b76f107f9cc47acfb88d552a51e28fa3d2dcfcf849886716511cf85c9094486e16fe7b1fcac4044a5a98b233f82499dd596595013591873ff430cad2bd47f3040670203010001" />
</PackageFiles>
<InstallChecks>
<MsiProductCheck Property="VCRedistInstalled" Product="{f65db027-aff3-4070-886a-0d87064aabb1}"/>
</InstallChecks>
<!-- Defines how to invoke the setup for the Visual C++ 14.0 redist -->
<Commands Reboot="Defer">
<Command PackageFile="vcredist_x86.exe" Arguments=' /q:a '>
<!-- These checks determine whether the package is to be installed -->
<InstallConditions>
<BypassIf Property="VCRedistInstalled" Compare="ValueGreaterThanOrEqualTo" Value="3"/>
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
<!-- Block install on Win95 -->
<FailIf Property="Version9X" Compare="VersionLessThan" Value="4.10" String="InvalidPlatformWin9x"/>
<!-- Block install on Vista or below -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.00" String="InvalidPlatformWinNT"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
</Product>
Package.xml
<Package
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
Name="DisplayName"
Culture="Culture"
>
<!-- Defines a localizable string table for error messages-->
<Strings>
<String Name="DisplayName">Microsoft Visual C++ 2013 Redistributable (x86)</String>
<String Name="Culture">en</String>
<String Name="AdminRequired">You do not have the permissions required to install Microsoft Visual C++ 2013 Redistributable (x86). Please contact your administrator.</String>
<String Name="InvalidPlatformWin9x">Installation of Microsoft Visual C++ 2013 Redistributable (x86) is not supported on Windows 95. Contact your application vendor.</String>
<String Name="InvalidPlatformWinNT">Installation of Microsoft Visual C++ 2013 Redistributable (x86) is not supported on Windows NT 4.0. Contact your application vendor.</String>
<String Name="GeneralFailure">A failure occurred attempting to install Microsoft Visual C++ 2013 Redistributable (x86).</String>
<String Name="VCRedistExe">http://go.microsoft.com/fwlink/?LinkID=800028&clcid=0x409</String>
</Strings>
</Package>
Hope it helps and it is easy to follow this long process.
Related
I'm using visual studio 2015 and Qt5.
I'have already added qt5.natvis on Vislaualizers folders.
I have set the "Use Native Compatibility Mode" option in Tools > Options > Debugging > General menu.
Even so, QString value does not appear correctly when debugging. Only memory direction appears on Locals/Autos/Watch windows. Any idea?
I have set Verbose option for Native diagnostic messages and this is what I get:
Natvis: Parsing natvis xml file: D:\<user_name>\Documents\Visual Studio 2015\Visualizers\qt5.natvis.
Natvis: Fatal error:
Natvis: Parsing natvis xml file: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\PythonDkm.natvis.
Natvis: Fatal error:
Natvis: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\qt.natvis(128,25): Error: a pointer to a bound function may only be used to call the function
Error while evaluating 'd->data,sub' in the context of type '<executable>!QString'.
Natvis: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\qt.natvis(127,6): Ignoring visualizer for type 'QString' labeled as 'QString' because one or more sub-expressions was invalid.
Original qt5.natvis from qt plugin for MSVS contains some strange problem. I use alternative natvis.
I'm not sure if this will work correctly on MSVS 2015, if so, you can ask the author to help you
You need to use older natvis files. The ones you're using appear to use functionality that wasn't available in VS 2015.
The natvis file comes from the qt-labs/vstools repository. GitHub's online browser shows two revisions for src/qtvstools/qt5.natvis.xml, one from 2018, another from 2020.
The the 2018 revision also renamed the file from src/qtvisualizer/qt5.natvis.xml, with one prior revision.
Since the oldest revision is from 2016, maybe that'd work for you with VS 2015.
I am trying to create a nuget package for my web application but it is not producing any .nupkg outputs. I am using Visual Studio 2017 15.3.0.
To create the project I do the following:
File - New - Project,
Visual C# - Web,
Asp.Net Core Web Application,
Web Application
Then I go to a command prompt in the directory with the csproj file in and type:
"Dotnet Pack"
I get only the following output:
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
But no nuget packages are created. I am expecting something like:
Producing Nuget Package "App.1.0.0" for App
Do I need to do anything else eg to the csproj file ?
Web applications are not packable by default. To change this, modify your csproj file to include this property:
<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>
Note that as of now (2017) there isn't a good story for "library web projects" or web project packages that work for all scenarios you would want to use a NuGet package for. But this property will at least unblock producing a package.
I had the same issue with VS2022, looked at the documentation and noticed they "silently deprecated" the command.
You now should add the following in your .csproj file:
You then generate a package and copy it to the "right" folder by calling
dotnet msbuild -t:pack -property:Configuration=Release "ProjectFile.csproj"
Have a look at the link, the title is a bit confusing but there seemed to have been a change after With MSBuild 15.1+
While installing BizTalk Server 2013 R2, when I try to check the component "Developer tools & SDK" it appears as an unavailable. I get the message "At least one of the requirements for this option is not installed or it doesn't met"
Could you please tell me why this option is unavailable? Do I need to install any other component before?
I am following the steps that I found at BizTalk 2013 Installation and Configuration – Install and Configure BizTalk Server 2013 (Part 9)
Ok here are all your possible installation scenarios :
You are installing BizTalk Server (whatever version) to make a Build Server =>Then yes you need Visual Studio to be able to install Developer tools & SDK, those packages contains MSBuild & other stuff that enable you to build & deploy an app
You are installing BizTalk Server as a "real" Server (Prod, Integration...) => You don't need developer tools & SDK
You are installing BizTalk Server on a Dev Machine => you are supposed to already have a Visual Studio installed
BizTalk 2013 /2013 R2 Project Templates with Visual Studio 2015
Yes, the Setup of the BizTalk 2013 requires for the feature 'Developer tools & SDK' per default Visual Studio 2012, and the Setup of BizTalk 2013 R2 Visual Studio 2013, otherwise the feature is disabled.
Frustrated with this fact (at work we have now upgraded to VS2015), I now find a way to install the templates under VS 2015 and without an installation of VS2012/ 2013 at the system.
Tool required: Orca to modify the msi.
Files to modify are located in subdir MSI of the BTServer dir of the extracted ISO (make a backup of these files!)
Installations to modify:
Microsoft BizTalk Server.msi and
Microsoft BizTalk Server64.msi
Modifications:
AppSearch-Table: Drop Row for the property 'CSHARP_INSTALLED'
Properties-Table: Add Row, property Name = 'CSHARP_INSTALLED', Value = 'True'
Properties-Table: Set the value of the property 'TargetVsVersion' to '14.0'
Do this for both MSI's, save.
Now, the Prerequirement VS 2012/ 2013 from the files
Setup.xml and
Setup_64.xml must be removed.
Simple remove the entry
<RequiredComponent Name="VS2012"/> or
<RequiredComponent Name="VS2013"/>
from the node
<Feature Name="Development">
DONE!
---EDIT
If someone has a valid RegKey to check if VS215 is installed, the Check in the Setup.xml can rewritten to this. This would be nice and valid
One valid modified Search for a Visual Studio 2015 installation could be:
<!-- language: lang-xml -->
<PlatformComponent _locAttrData="DisplayName" _locID="25" Name="VS2015" DisplayName="Microsoft Visual Studio 2015">
<Detection Type="RegDWORD">
<DetectKey Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\14.0\Setup\Visual Studio 2015 Prerequisites" Value="InstallSuccess" ValueData="1"/>
</Detection>
Visual Studio 2013 is a software requirement for BizTalk Server 2013 R2 Developer Tools and SDK.
More info: Hardware and Software Requirements for BizTalk Server 2013 and 2013 R2
Can I run fortify scan on my machine without Visual Studio Installation?
I mean by fulfilling the basic requirements. Currently when scanning the code via fortify there are errors like cannot locate ildasm.exe
MSBuild: [error]: Unable to locate the Microsoft .NET disassembler tool (ildasm). Please make sure you have Visual Studio .NET version 7.1 or greater installed along with the SDK.
MSBuild: If ildasm is installed in a non-standard location, please provide the full path to ildasm in the fortify-sca.properties file as com.fortify.sca.IldasmPath.
Yes, you can. You will need the Windows .Net SDK or a copy of the files from a development box. These files are typically located at C:\Program Files(x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools or similar. I've set up automation on machines that do not have Visual Studio installed and I just copy these files to a suitable location.
Next, you need to alter [FortifyInstallRoot]\Core\config\fortify-sca.properties and add com.fortify.sca.IldasmPath=[Path to the SDK files] using forward slashes (/) and NOT back slashes (\).
Finally, you will need to add some registry keys so that Fortify knows where to look for .Net Framework assemblies:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1]
"CLR Version"="v2.0.50727"
"InstallDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 7.1\\Common7\\IDE\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0]
"CLR Version"="v2.0.50727"
"InstallDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 8\\Common7\\IDE\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0]
"CLR Version"="v2.0.50727"
"InstallDir"="c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\IDE\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0]
"InstallDir"="c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\"
"CLR Version"="v4.0.30319"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0]
"InstallDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\"
"CLR Version"="v4.0.30319"
If you want to exercise GUI option, you can use Audit workbench.
Open the project that you want to scan, it will show up all files that you want to include in scan.
I am wanting to use Visual Web Developer Express 2010 to publish a website, pre-compiled to a remote server over FTP using the following settings:
Deploy only files needed to run this application
Precompile this application before publishing
Allow website to be updatable
No databases are being deployed
Site is being deployed as file hierarchy, not as .zip package
My first build/deploy seemed to have gone well, but after my second compilation I receive the following error:
Transformed web.config using C:\path_to_site\Web.Debug.config into obj\Debug\TransformWebConfig\transformed\web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\AspnetCompileMerge\Source.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.5\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets(132,5): Error : Can't find the valid AspnetMergePath
And here's a subset of the content of the Microsoft.Web.Publishing.AspNetConfigurationMerge.targets file:
<Target
Name="GetAspNetMergePath"
DependsOnTargets="$(GetAspNetMergePathDependsOn)"
Condition ="'$(GetAspNetMergePath)' != 'false'">
<PropertyGroup>
<AspnetMergeName>aspnet_merge.exe</AspnetMergeName>
<AspnetMergePath Condition="Exists('$(TargetFrameworkSDKToolsDirectory)$(AspnetMergeName)')">$(TargetFrameworkSDKToolsDirectory)</AspnetMergePath>
</PropertyGroup>
<Error Condition="'$(AspnetMergePath)' == '' Or !Exists($(AspnetMergePath))"
Text="Can't find the valid AspnetMergePath" />
</Target>
EDIT: Changing the publish settings to delete all existing files before publishing does not fix the problem after all. I'm assuming that the problem is local for now because of this.
There does not appear to be an AspMergePath tag in my web.config. I am not aware if I am supposed to manually add the tag. However, the path "obj{publish setting}\AspnetCompileMerge\Source" does exist in my project.
And in case it matters, my project name is "TestProject.NET"
Your feedback is appreciated.
I hit the same problem. Searched through all microsoft related sites, found a lot of complaints and no intention from microsoft to fix it.
Here how I worked it around at my system. Edit the Microsoft.Web.Publishing.AspNetConfigurationMerge.targets file and add the following line. Please make sure that the Microsoft SDK path is the same on your PC, if not then change it:
<TargetFrameworkSDKToolsDirectory>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\</TargetFrameworkSDKToolsDirectory>
Here is how it should look like:
<Target
Name="GetAspNetMergePath"
DependsOnTargets="$(GetAspNetMergePathDependsOn)"
Condition ="'$(GetAspNetMergePath)' != 'false'">
<PropertyGroup>
<TargetFrameworkSDKToolsDirectory>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\</TargetFrameworkSDKToolsDirectory>
<AspnetMergeName>aspnet_merge.exe</AspnetMergeName>
<AspnetMergePath Condition="Exists('$(TargetFrameworkSDKToolsDirectory)$(AspnetMergeName)')">$(TargetFrameworkSDKToolsDirectory)</AspnetMergePath>
</PropertyGroup>
<Error Condition="'$(AspnetMergePath)' == '' Or !Exists($(AspnetMergePath))"
Text="Can't find the valid AspnetMergePath" />
What you need is aspnet_merge.exe, tool that is distributed as part of Windows SDK. It's intended to precompile sites, so you can either turn that precompilation off, or install proper version of Windows SDK. Reference is to the Wikipedia, because of nice prepared links to the download pages. You don't need to download/install everything (it's huge), just download web installer and select .Net tools, it will take around 50 megabytes.
Please, notice that bundled with Visual Studio 2010 Windows SDK ver. 7.0A isn't available to separate download, so you'll have to either install Visual Studio on your build server, or tweak something as described in answers to "Running MSBuild fails to read SDKToolsPath".
Here is a solution that does not require changing the targets file. The workaround from http://connect.microsoft.com/VisualStudio/feedback/details/786492/publish-cant-find-the-valid-aspnetmergepath suggests passing additional properteries to msbuild. I was able to get it to work using this:
msbuild website.publishproj /p:DeployOnBuild=true /p:PublishProfile=Release /p:VisualStudioVersion=12.0 /p:AspnetMergePath="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\"
The key here is the AspnetMergePath property, which you may need to change if the Windows SDK is installed in a different location. If I include the GetAspNetMergePath property from the workaround it fails, but that may be needed depending on the SDK version.
One workaround for all this stuff [including having to install the SDK etc] is to disable the Precompile On Publish option, which requires AspNetMerge to be present even if you're not specifying that you want stuff to be merged in the ultimate output.
I was going to great lengths to figure out how to turn it off, poring over the options dialog and Reading the Friendly Manual to confirm I had it turned off for ages only to realize it was the checkbox outside:
Unchecking yields the following changes to the .pubxml:
- <PrecompileBeforePublish>True</PrecompileBeforePublish>
- <EnableUpdateable>True</EnableUpdateable>
- <DebugSymbols>False</DebugSymbols>
- <WDPMergeOption>DonotMerge</WDPMergeOption>
Which worked for me.
NB it is however critical to have as covered here both the Web (which will silently make publishing via /p:DeployOnBuild inert) and the WebApplications (which will give a compiler error) subfolders present under %Program Files (x86)%\MSBuild\Microsoft\VisualStudio\v14.0 (assuming Visual Studio 2015 tooling) for publishing to successfully generate packages
I hit the same problem.
Edit the Microsoft.Web.Publishing.AspNetConfigurationMerge.targets file and add the following line. Make sure run editor with Administrator Rights.
Looks the correct versión Visual Studio in my case VS2013.
x64
<TargetFrameworkSDKToolsDirectory>C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\</TargetFrameworkSDKToolsDirectory>
x86
<TargetFrameworkSDKToolsDirectory>C:\Program Files\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\</TargetFrameworkSDKToolsDirectory>
And it Works! I can compile my Project.
In my case was missing. It happened after updating Visual Studio 2017 to 15.7.5. Before that it was working fine. I have to add
<TargetFrameworkSDKToolsDirectory>C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\</TargetFrameworkSDKToolsDirectory>
It was at Line no 129 in Microsoft.Web.Publishing.AspNetCompileMerge.targets
change targetFramework ...
<compilation debug="true" targetFramework="4.8"/>
<httpRuntime targetFramework="4.8"/>