I have a working visual studio 2019 project with a simple nuget package, where if I right click 'ClassLibrary2' and click 'pack' it packages my project into a NuGet package
I want to package this folder NxTestware, when I include the folder in my project and try to pack again, it results in errors that come from inside the source folder, like it is trying to build the contents of that folder
Is there some way in visual studio I can tell it that when I click 'pack', do not build the contents of the NxTestware folder?
After trying I can't reproduce your issue on my side, please check your project's csproj file, and refer to this document: How to: Exclude files from the build.
Related
i'm trying to create typescript app in Visual Studio 2022. I'm choosing "React standalone template" that uses typescript. After choosing it - console that install all the files needed appear.
After what i see empty project:
Empty Project
If i press on button "Show all files" i can see files related to Typescript project:
Hidden files
But when i try to include them to project - nothing happens though and they still look like hidden files (but i can see that files are added in csproj file). When i do "npm start" - project load localhost site correctly. Is there any way to include those files to see them in a correct way included to my project?
I tried resetting Visual studio settings, installed Typescript SDK Kit, reloaded project and VS, reloaded my PC, deleted project and created new one instead. Node.js and NPM are installed on my PC. What else can be the issue? I've found youtube video about Angular standalone template in VS and everything seems to be added to project by default, so i believe this is not expected behaviour that files are unloaded on my environment
I have a simple WinForms app that I'm trying to package with MSIX. The app itself requires additional files that when I build the MSIX App Project doesn't copy/include.
Specifically this LIBVLC folder that gets included during the WinForms app build itself.
If I manually copy that folder over into the AppX build folder, everything works. Obviously I'm trying to automate including that folder.
Folder manually copied over in screenshot below:
How can I accomplish this? GitHub minimal repo:
https://github.com/aherrick/MSIXWinFormsLIBVLC
I suspect that this line is your issue : https://github.com/aherrick/MSIXWinFormsLIBVLC/blob/0e717828a16e796a7a27e415cf45d33a50327da9/MSIXWinFormsLIBVLC.AppPackage/MSIXWinFormsLIBVLC.AppPackage.wapproj#L80
The nuget package isn't really well understood by the build tools as those are native files that we collect "before build". It seems to cause issues when a project references a project that references the nuget package, and the usual workaround is to reference the nuget package directly in the topmost project.
Is it possible to reference a nuget package in a .wapproj ?
If it isn't, that's an issue for this repository https://code.videolan.org/videolan/libvlc-nuget/ . Contributions welcome
I created a web application using angularJS with typescript in Visual Studio 2015.
Is it possible to add the generated .js files automatically to the project after compiling?
Do I have to delete the .ts files before deploying to Azure or something like that?
Is it possible to add the generated .js files automatically to the project after compiling?
If the ts file is included with as <TypeScriptCompile in the project file (should happen automatically if you have TypeScript tools for Visual Studio) VS will compile and generate a js file.
Do I have to delete the .ts files before deploying to Azure or something like that?
No. However you should have the generated .js files included in the project to ensure they get deployed after build.
I'm using NuGet GUI and trying to include XML File along with my DLL to distribute help along with the DLL.
When I install package in any of the project, it adds the DLL reference successfully, but XML file is not generated inside bin folder of the project in which package is added.
XML file is available within packages\\lib\.XML
Any help would be very much appreciated.
Thanks in advance
On your side of things:
Check this post:
How do you include Xml Docs for a class library in a NuGet package?
On the developer's side of things:
The creator of the NuGet package decides some of this.
http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package
Find : Automatically Running PowerShell Scripts During Package Installation and Removal
So I think the developer of the Nuget package would have to write the voo-doo.
Or you'll have to manually include it yourself.
Both the .dll and the .xml file should be copied to your project's output folder when the project is compiled.
NuGet will not copy the .xml file, nor the .dll, in your bin folder when you install the package. If you want to do this then you will have to use PowerShell. I do not believe you need to do this since MSBuild will do this anyway at compile time.
We have a VS 2010 solution that includes a few class library projects, a SQL Server 2008 database project and a Wix setup project. We are trying to get to a point where the following happens in the order specified:
Build the class library projects and the database project
Deploy the database project to generate the deploy .sql script
Build the Wix setup project.
The reason for the desired order is that the setup project requires the deployment .sql scripts as it will use these to generate/update the database on the machine that the msi is run.
It seems that there is no way within a Visual Studio solution file to create this type of build/deploy/build order. Is this correct?
Thanks
You could change the BeforeBuild target of the Wix project (*.wixproj) to deploy the database project before the build:
<ItemGroup>
<DatabaseProject Include="../Database1/Database1.dbproj"/>
</ItemGroup>
<Target Name="BeforeBuild">
<MSBuild Projects="#(DatabaseProject)"
Targets="Deploy"
Properties="Configuration=$(Configuration);Platform=$(Platform)"/>
</Target>
How are you building it? You can change the build order in a solution from Visual Studio, granting you build it from Visual Studio. In Solution Explorer go to Build Order or so.
If you do it from command-line/MSBUILD you can build the first, then the second and the last project, easy, just call MSBUILD on each project, in the desired order. Thought there should be a finer control, I don't remember.
EDIT: It's called "Project Build Order", under the the solution node, it activates when you have more than 1 project in the solution.
I have tried this and get an error when I tried to reload the project after editing. However ignoring the error and reloading the project again worked fine and indeed building the Wix project triggers a deploy of the database project.