Specify output executable name for burn bootstrapper - wix

In VS2012 I created a WIX Bootstrapper project (BURN). I named the project "Bootstrapper". Now the bootstrapper works fine, but I would like to change the name of the generated file (bootstrapper.exe) in something different. I am unable to find where this outputfile name is set.

Well, you can also do it from within VS 2012:
In Solution Explorer, right click on your Bootstrapper Project and from Context menu, click on Properties:
This should open the Properties page for your Project. You can change the output file name (and output type as well) of your Bootstrapper project
Update: Here is the screenshot of dialog:
Regards

I found the answer myself. In Visual studio unload the project and change the OutputName element in the xml.

Related

How to customize C# .NET Framework Manifest without Visual Studio

I primarily use JetBrains Rider, which appears to lack the option to add a manifest (though my installation of Visual Studio mysteriously lacks "Application Manifest" under the "Add Item" menu anyhow).
So, I created app.manifest and filled it with the desired XML (in my case, it's a vanilla manifest with the classic <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>)... but it didn't work.
I Changed Build Action to EmbeddedResource... but it still didn't work.
I renamed the file to sandbox.exe.manifest... still nothing!
If I open the exe in a text editor, I see two manifests - mine, and the default.
What step am I missing?
You have to specify manifest file name in the project file. Open corresponding csproj file (Solution Explorer -> select your project -> F4 \ Edit sources) and add the next line to the global properties group :
<ApplicationManifest>app.manifest</ApplicationManifest>
For more information you can read this question:
How can I embed an configuration-specific manifest file in my c# app?

Visual Studio 2017 VSIX with ASP.NET Core 2 Web Application template just installs a blank project

I followed the "Getting Started with the VSIX Project Template" Microsoft documentation to create an ASP.NET Core 2 Web Application template and after running the VSIX file I have the new project template listed but when I create a new project with it none of the files are there. It is just an empty project. My attempt can be found here: https://github.com/DrewBrasher/ExampleAspNetCoreTemplate
The steps in the documentation are:
Create a project template.
a. Open the project from which to create a template. This project can be of any project type.
b. On the Project menu, click Export Template. Complete the steps of the wizard. A .zip file is created in %USERPROFILE%\My Documents\Visual Studio \My Exported Templates.
Create an empty VSIX project. On the File menu, click New and then click Project. Select either Visual Basic or Visual C#. Under the selected node, select Extensibility, and then select VSIX Project.
Add the .zip file to the project. Set its Copy to Output Directory property to Copy Always.
In the Solution Explorer, double-click the source.extension.vsixmanifest file to open it in the VSIX Manifest Designer, and then make the following changes:
Set the Product Name field to My Project Template.
Set the Product ID field to MyProjectTemplate - 1.
Set the Author field to Fabrikam.
Set the Description field to My project template.
In the Assets section, add a Microsoft.VisualStudio.ProjectTemplate type and set its path to the name of the .zip file.
Save and close the source.extension.vsixmanifest file.
Build the project.
In the output directory, double-click the .vsix file.
A VSIX Installer message box appears. Follow the instructions to install the extension.
Close Visual Studio and then re-open it.
I believe this is a Visual Studio bug but I have found a workaround. After exporting the project as a template (step 1b), you need to:
Extract the zip file.
Add this to the "TemplateData" section of the .vstemplate file:
<CreateInPlace>true</CreateInPlace>
Compress the files back into a zip file.
Continue with the rest of the documentation.
Sources:
https://developercommunity.visualstudio.com/content/problem/21751/creating-new-project-from-vs-2017-rc-exported-temp-1.html
Exported project template in VS2017 misses source files

how to get correct path for file stored in My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData folder under installer class

I have a windows forms application which stores data in
My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData + "\a.xml"
When I run and test this path, it shows path as:
C:\Users\<username>\AppData\Roaming\<Manufacture name>\<Product Name>\1.0.0.0\a.xml
I want to delete above file at the time of uninstall.
So I have created custom action using installer class (please note that I have created installer class in main project, not in setup project as setup project does not show option to add installer class). In installer class, I have override uninstall method and using same above code
My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData + "\a.xml"
I have tried to delete file. Obviously I have pointed it to uninstall folder in setup project which should delete above file, but I can see that in setup project above is taking different path. It is taking path as
C:\Users\<username>\AppData\Roaming\Microsoft Corporation\Windows Installer - Unicode\5.0.7600.16385\a.xml
I am using Visual Studio 2013. Please suggest how to solve this problem.
The easiest workaround I found for this issue is to change the version number so no need to delete any file as it is creating different directory for different version number.

Unable to build WixStdBootstrapperApplication - get error "C:\tools\WixBuild.props" was not found

I am trying to make changes to the WixStandardBootstrapperApplication.cpp and generate a dll as per the suggestion from this link. I have downloaded the wix310-debug source and am modifying the file present under wix310-debug\src\ext\BalExtension\wixstdba\ location. There is a wixstdba.vcxproj file under this location which I am trying to open using Visual Studio 2012. Whenever I try to do that I get the error:
Unable to read the project file "wixstdba.vcxproj". The imported project "C:\tools\WixBuild.props" was not found.
I am not sure what should I do to correct this. Also, based on the referenced link, I think I am updating the correct file but let me know if that is not the case. Any help in this would be great. Thanks in advance.
In your vcxproj there's a line like this:
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
The debug source isn't really the source of wix. It includes all the wix source files but it is not really buildable. This zip has all the built pdbs and is used to debug only.
You want to download the wix source from wixtoolset's github so that you can build wixstdba. But, this is for version 3.10.3 currently and may have some version specific changes but I don't see anything that would be an issue using the dll built here against wix 3.10.2 since the engine and bootstrapper application interfaces should have remained the same.
But, you should be able to build all this with only the WixStdBA project. You will have to copy over the wixstdba folder. Edit the vcxproj and remove the import line mentioned above (it should be near the bottom).
Now, add this project to your a new solution or your installer solution in visual studio. We need to add addition include and library directories. All these include directories will be in your wix install location (default C:\Program Files (x86)\WiX Toolset v3.10) In Properties -> C/C++ -> General -> additional include directories add your wix SDK include path. If you are using visual studio 2013 you can use the full path or you can use "$(WIX)\SDK\vs2013\inc". $(WIX) should reference the WIX environment variable which points to the install directory which is added when installing wix. This should be the better option if you will be building on a build system with wix installed since the location may be different across machines.
Now for addition library directories, we go to the Properties -> Linker -> General -> Additional Library Directoryes and add in the correct lib path. If you are using visual studio 2013 you want to put in $(WIX)\SDK\vs2013\lib\x86. Finally we need to reference the libs that are needed to build the bootstrapper dll. Under Linker -> Input -> Additional Dependencies, add in "dutil.lib;balutil.lib". My additional dependencies has a lot more stuff and I don't remember if it was by default there. Here's my Additional Dependencies in full anyways
dutil.lib;balutil.lib;advapi32.lib;comctl32.lib;comdlg32.lib;gdi32.lib;gdiplus.lib;kernel32.lib;msimg32.lib;odbc32.lib;odbccp32.lib;ole32.lib;oleaut32.lib;shell32.lib;shlwapi.lib;user32.lib;uuid.lib;wininet.lib;winspool.lib;version.lib;%(AdditionalDependencies)
With this you should be able to build the wixstdba project and get a dll built. Without editing any code this should be the exact same as the wix included wixstdba.dll.
You could try referencing this dll instead of the wix included one (have to define your own BootstrapperApplication instead of using the BootstrapperApplicationRef to one of the wix ones) or just drop in this dll into your wix location's bin.

Visual Studio 2013 C# Web Project builds but IDE reports The type or namespace name xxx could not be found error

When opening an MVC4 C# web project in Visual Studio 2013, the IDE reports the error "The type or namespace name '_' could not be found (are you missing a using directive or an assembly reference)", but the project builds and runs without any errors. Furthermore, intellisense does not include the project namespace.
The "missing" reference is to files within the same project.
for example; the web project namespace is "webproject.com", and references in a controller files to "webproject.com.models" is underlined in red with the error above.
I have checked the following:
All Solution projects are configured to use the same Target Framework(.Net 4)
web.config in the Views folder contains the namespace in the system.web.webPages.razor section
cleaned and rebuilt solution
deleted all bin and obj content
deleted .suo and .csproj.user files that were created by VS2010
The only way that I can get rid of these errors being reported in VS2013 is to unload then reload the project.
When opened in Visual Studio 2010 I do not get these problems.
I have the same issue.
ALthough the project compiles correctly, the code editor shows an error The type or namespace name '_' could not be found (are you missing a using directive or an assembly reference).
THere is one workaround. Just delete the *.SUO files and re-open the solution. THen for this only Session it works. Unfortunately after closing and reopening the solution the issue is back again. VS 2012 works fine.
Seems to be a bug in VS 2013....
My solution, when I encountered the problem with VS 2013 Express edition was to simply unload the offending project and reload. Opening the SUO or Project file and making changes had not affect.
Try to unload the project in VS2013, then right click the node and select edit "projectname.csproj". Check the individual references they might point to somewhere strange.
EDIT: the csproj file is an xml file and the references are located under Project -> ItemGroup -> Reference
I had the same issue.
It's a VS 2012 solution with different projects.
Search for all *.suo files and deleted them.
Rebuild and reopen Visual Studio.
There's a known issue with Web Application projects when bound to a TFS server that sounds like this issue. This occurs when the following TFS setting option is checked:
Options -> Source Control -> Environment -> Get everything when a solution or project is opened.
Disabling this option resolves the problem.
thanks,
Miguel Lacouture
[MSFT]
Same issue, on project reference.
I opened the referenced project file (*.csproj) with a text editor and did some cleanup:
1) reset these properties' values:
<PublishUrl>publish\</PublishUrl>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
2) removed dirty platform/configurations:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x86|AnyCPU'">
...
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x86|x86'">
...
Now I can compile without any issue.
Glad to share it with you! :))
Same issue. Opening the project's properties and making a change to the name (or any value) and then rebuilding seems to have resolved it.
I have just had this problem and none of the solutions here helped. I fixed mine by doing a repair of Visual Studio (An option when you select to uninstall the program). Hope this helps someone
I had same issue when I added a new class file ( e.g. MyClass.cs) and called it in some other C# code places. For some reason VS did not add that new class file to my working project folder (not seen in VS, but seen in Windows File Explorer). And, hence, the compile path for new class file is not included in the compile section of my project file (e.g. MyProject.csproj). So to solve this problem, First, right click on your working project > Add > Existing Item ... > Select your new class > OK.
Then, check the project file (*.csproj) and make sure a new element is inserted in the compile section such as:
Finally, rebuild your project and the problem should be solved.
Another reason for this issue is the project, I had long ago with VS, is my other project was set up with Client Profile as its target framework. So, to solve the issue: Right click your project in VS > Properties > Application tab > make sure Target Framework option is not Client Profile. You should change all projects in your solution to the same framework version AND all of them must not have Client Profile option.
Microsoft just released a new security update to be automatically applied to machines configured to use Microsoft Update.
Unfortunately, some ASP.NET MVC 3 and 4 VS projects can no longer build after the update is applied. These projects will fail with the following error:
"Could not locate the assembly "System.Web.Mvc,Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35,processorArchitecture=MSIL"
My project also had the error "The type or namespace name 'System.Web.Mvc' could not be found (are you missing a using directive or an assembly reference)". Installing the latest version of Microsoft.AspNet.Mvc solved my problem. See the following article from Microsoft for more info:
http://blogs.msdn.com/b/webdev/archive/2014/10/16/microsoft-asp-net-mvc-security-update-broke-my-build.aspx
Unloading and then reloading the project worked for me.