csproj

Creating a .Net solution on the command line with mono

我只是一个虾纸丫 提交于 2019-12-24 03:50:18
问题 I run Linux and have Mono installed, I do not have MonoDevelop installed. I would like to create solution and csproj files from the command line. How do I do this? A similar question has been asked, it was asked some time ago, with an answer stating it can't be done. But I can't accept this is the case. It appears Microsoft has a such a tool, projectgen.exe, at least for projects. If this truly is not possible what other options do I have? Do I need to hand generate templates and then modify

Without editing the csproj file, get MSBuild to copy all files marked as Content to a folder, preserving folder structure?

女生的网名这么多〃 提交于 2019-12-24 02:23:56
问题 Question Ultimately, we would like to use the command line to copy all files that a csproj has marked as Content , while preserving the directory structure, and without editing the original csprog file. We have seen How can I get MSBuild to copy all files marked as Content to a folder, preserving folder structure? This doesn't work for us, because it involves editing the csproj file. We want to avoid doing that. MSBuild? We've thought of using msbuild via the command line but we don't know

Msbuild ItemGroup exclude doesn't work with wildcards

天大地大妈咪最大 提交于 2019-12-24 00:07:04
问题 This Itemgroup ItemsFromAnotherTarget contains: ..\..\References\AnotherFolder\ReferencedAssembly.dll bin\GeneratedAssembly1.dll bin\GeneratedAssembly2.dll somefolder\somefile.txt somefolder\somefile.exe bin\anexe.exe The idea is to generate another item group BinaryFiles containing bin\GeneratedAssembly1.dll bin\GeneratedAssembly2.dll somefolder\somefile.exe bin\anexe.exe So I have the following: <ItemGroup> <BinaryFiles Include="@(ItemsFromAnotherTarget)" Condition="'%(Extension)'=='.dll'

Does the order of items in a csproj file matter?

China☆狼群 提交于 2019-12-23 18:17:51
问题 I would like to programatically manage the VS2008 csproj files in our solution across the team. We get occasional merge issues (in Hg) simply because two developers add different new files in a project, but they end up in the "same place" in the csproj file and trigger the need to "resolve the conflict". Sometimes, one tag gets lost and triggers build errors. Can I merge <ItemGroup> s that seem to just list or tags? Can I reorder <Content> or <Compile> tags? or, are they in some "smart" order

List of nodes in a particular node in .csproj file with Powershell

霸气de小男生 提交于 2019-12-23 11:14:41
问题 I would like to ask some help because I'm totally lost. I would like to check whether nodes in a particular part of the .csproj files contains proper data or not. In the xml snippet below I would like to get back the value of the "title" under the PropertyGroup belongs to "Debug|x64" profile. csproj file snippet <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$

Reading the list of References from All csproj project of solution sln (programmatically)

╄→гoц情女王★ 提交于 2019-12-23 10:55:06
问题 I have solution sln, that has many csproj projects. anyone know a way to programmatically read the list of References of all csproj projects in a VS2008 of sln file? 回答1: csproj files are just XML files. You can use XDocument from the .NET framework for this. I've done it for VS2010, but in VS2008 the tags are almost the same. Example for VS2010, you have to verify the tags and namespace: XElement projectNode = XElement.Load(fileName); XNamespace ns = "http://schemas.microsoft.com/developer

Visual Studio, csproj: How can I specify a linked file in DependentUpon?

限于喜欢 提交于 2019-12-23 09:34:44
问题 Suppose I have a default.aspx.cs in my project, but I want to make it dependent upon the default.aspx file that's linked. E.g.: <Content Include="..\somedir\default.aspx"> <Link>Default.aspx</Link> </Content> This doesn't work: <Compile Include="default.aspx.cs"> <DependentUpon>Default.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubType> </Compile> This also doesn't work: <Compile Include="default.aspx.cs"> <DependentUpon>..\somedir\default.aspx</DependentUpon> <SubType>ASPXCodeBehind<

How get the default namespace of project csproj (VS 2008)

▼魔方 西西 提交于 2019-12-23 07:37:03
问题 I have VS 2008 and csproj project (C# Library). In properties of project, has an assembly name, and default namespace. Note: each class has a namespace. Is it possible, in runtime, get the value of default namespace ?? My target is use resources, and I need default namespace's value: Assembly assembly = Assembly.GetExecutingAssembly(); //foreach (string resourceName in assembly.GetManifestResourceNames()){} Stream syntaxModeStream = assembly.GetManifestResourceStream(pathToResources + "

Using GruntJS to filter which files get deployed

早过忘川 提交于 2019-12-23 05:41:51
问题 Currently the static resources we use are part of a web project in Visual Studio. There are certain files in the project that we want locally that we don't want being deployed to production. We manage this by using the .csproj file and seeing if a file is mark as "content" or "none" etc. (If it's marked as "none" it doesn't get pulled on the deploy). This works great however we are moving our development out of Visual Studio and into a more Javascript friendly IDE. However if we add or delete

Using GruntJS to filter which files get deployed

二次信任 提交于 2019-12-23 05:41:28
问题 Currently the static resources we use are part of a web project in Visual Studio. There are certain files in the project that we want locally that we don't want being deployed to production. We manage this by using the .csproj file and seeing if a file is mark as "content" or "none" etc. (If it's marked as "none" it doesn't get pulled on the deploy). This works great however we are moving our development out of Visual Studio and into a more Javascript friendly IDE. However if we add or delete