I have a solution in Visual Studio 2010 that creates a vsix to install a custom project template to VS. I have the actual template (unzipped) added as a project in my solution for easy modification. It does not build because of all the $replacements$ in illegal in buildable code.
Right now, here's my workflow to build the solution:
Build is disabled on the Template project
Manually zip the template up in Windows Explorer
Manually copy the zip into the Project Templates folder of the VSIX project
Run Build on the solution so the VSIX will build with the new zipped template
I was hoping to streamline this process by redefining how VS should build my template project... namely that instead of compiling, it should zip it up and move the zip into my VSIX project. Is that possible?
You can change the build action of the items in the template to ZipProject. Then you can copy the zip file whereever you need it to go. Might need to edit the project file manually or do a post build action...
Related
I have a project that uses VideoLAN.LibVLC.Windows nuget pkg. When I build and compile application it generates a libvlc folder.
My program builds as it should, but when I try to compile an installer using the extension Microsoft Visual Studio Installer Project it won't include the libvlc folder that is created when I build a release.
I've included the 3 options:
Content Files,
Primary Output,
Publish Items
The folder is generated at build so I cannot include it with Resources Properties.
How can I get the extension to include the folder for the installer?
EDIT:
My workaround is adding files manually to point to the release folder, is that correct or is there a better way?
I am creating a Custom Visual Studio Project Template. This custom project template consists of two folders which needs to contain some binaries. These binaries has to copied from some server location. As these binaries will be updated periodically i can't simply enclose them while creating the custom project template. I would like to copy them from server location whenever the developer selects this custom project template the two folders inside their Visual Studio might get the latest binaries from the server location. I have to do this with PowerShell script only. Can someone help me on how to execute PowerShell scripts while creating custom project template in Visual Studio.
Why don't you create your own custom nuget packages? Then you only have to "refresh nuget packages" after creating the project from template.
I have build their solution and it works but I want to add a new project and I just can't it says
Cannot open include file: 'CL/cl.h': No such file or directory
What seems to be the problem
Best thing to do is to copy all the settings and project properties from the SDK samples and then execute. Or take a sample project and copy it to your workspace and deleted all the unnecessary files.
I have created a msbuild task that minifies and combines javascript and css files that is triggered when my visual studio project is built.
This task adds the minified and combined files to the file system.
However I would like that they automatically be added into the visual studio project. Is this possible and if so, how can I achieve this?
I would recommend against doing this inside the default "Build" target of your project file -- IMO the Build target should be pristine and should do nothing but compile/build the project itself. It also can create headaches depending upon how and when your builds execute in your build lifecycle.
Instead, create a new MSBuild target in your build file which performs this addition for you. I hope you have a main build file outside your Visual Studio project -- this will make everything much easier. Since your CSProj file is just a simple XML (MSBuild) file, it's easy enough to write your own custom task which modified the project to add whatever files you like to it.
I'm currently working on a Visual Studio integration project for VS2010 (a custom highlighter) I'm using Irony and the LanguageServiceTemplate from this Code project article. However that template is build for 2008 and the changes made in VS2010 when it comes to integrating breaks the template.
When I try to compile I get the following error:
Source.extension.vsixmanifest file not found in project. If a file with this name is present in the project, make sure the build action is set to "None".
Any ides of what I can do to fix it?
You have two options depending on how your package is constructed.
1) Edit the project file and remove the following line.
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets" />
If you do this, you will lose a few things like the automatic zipping of your item and project templates.
2) Add a source.extension.vsixmanifest file to the root of your project. You can get one by creating a new VSIX Project. After you install the Visual Studio 2010 SDK, this is under the Extensibility category. If you add no content, it won't create a vsix file.
The second method is probably the best route to go. I have a specific VSIX project that I use to pull in various other package projects. If you only have one project, you can use the new vsixmanifest file to include the project to make an installer.