问题标签 [csproj]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - 在 .csproj 文件中,什么是为了?
怎么
不同于
?
.net - 同时面向 .NET 3.5 和 Silverlight
假设我已经有一个构建 .NET 3.5 程序集的项目。现在我想为 Silverlight 构建这个程序集,此外,以最小的努力维护其 Silverlight 版本。
什么是不可接受的:
- 为 Silverlight 构建创建单独的项目
什么是可以接受的:
- 添加自定义指令允许我根据 MSBuild 属性来定位 Silverlight 或 .NET。
- 为 Silverlight 添加特殊构建配置
- 将#ifdef Silverlight / #endif 部分添加到源代码中。
- 通常对 .csproj / .cs 进行任何其他修改。
所以基本上,我想维护一个项目,但针对两个框架。我不想维护两个单独的项目,因为这可能会导致错误,例如忘记包含新文件。如果有很多项目和大团队,排除此类错误非常重要。
如果这完全不可能,那么任何提供类似好处的解决方案都是可以接受的。
text-editor - 如何使记事本++自动将csproj文件视为XML?
我经常使用 notepad++ 来编辑 csproj 文件。而且我总是需要转到语言菜单并选择 XML 才能获得语法高亮。
是否可以将 notepad++ 配置为自动将 csproj 文件视为 XML?
c# - 在csproj文件中设置源文件依赖项,无需手动编辑
我想对部分类的所有文件进行分组,类似于 myForm.cs、myForm.resx 和 myForm.Designer.cs 的方式。我可以通过手动编辑 csproj 文件并将 DependentUpon 元素添加到文件中来做到这一点,但我可以使用 GUI 来代替吗?
c# - 从 csproj 文件中读取引用列表
有谁知道以编程方式读取 VS2008 csproj 文件中的引用列表的方法?MSBuild 似乎不支持此功能。我试图通过将 csproj 文件加载到 XmlDocument 中来读取节点,但是 XPath 搜索不返回任何节点。我正在使用以下代码:
如果我可以获得 ItemGroups 列表,我可以确定它是否包含参考信息。
asp.net - 重新编译 ASP.NET Web 项目而不给它一个虚拟目录
在我的工作中,我经常从他们长期被遗忘的存储库中检索非常特定版本的硬壳 ASP.NET Web 应用程序,进行微小的更改,然后重新编译。
这个过程中的一个主要烦恼是必须为我需要重新编译的每个 Web 项目创建一个虚拟目录。我对这个过程没有任何问题,但它很乏味,而且在 .NET 1 项目上仍然是一个非常手动的过程。
有没有一种相当简单的方法来重新编译 csproj 的二进制文件而不设置新的虚拟目录?
编辑:我不介意使用命令行工具或外部解决方案,只要它们相当简单明了。
msbuild - 在 .csproj 中包含项目锥之外的内容文件
我有一个 C# 项目说 MyProject.csproj 位于“C:\Projects\MyProject\”。我还有一些文件要复制到该项目的输出目录中。但是,文件位于“C:\MyContentFiles\”位置,即它们不在项目锥内。该目录也有子目录。目录的内容不受管理。因此,我必须包括它下面的所有内容。
当我将它们作为“内容”包含在项目中时,它们会被复制,但目录结构会丢失。我做了这样的事情: -
如何在保留目录结构的情况下将这些文件/目录递归复制到项目的输出目录中?
c# - 什么控制 .csproj 文件中的 ProductVersion 设置?
我们的源代码控制引擎时不时地指示ProductVersion
.csproj 文件中的 .csproj 文件已更改。我们使用的是 VS2008 SP1。
查看代码库,我可以看到报告的两个版本:
和
有谁知道 Visual Studio 为什么以及何时决定更改此设置,以及这两个版本号指的是什么?
c# - 从 .csproj 中访问 solutioninfo.cs 和 assemblyinfo.cs
我需要从我的 .csproj 文件中的 solutioninfo.cs 和 assemblyinfo.cs 访问一些信息并将其用作属性。
使用的价值
在我的 csproj 中:
有没有办法访问这些值?
visual-studio-2008 - Open Visual Studio project as readonly
Scenario:
I'm using svn:externals to grab Microsoft.Practices.ServiceLocation from CodePlex. However, referencing the csproj-file in my own project causes an upgrade from 2005 to 2008. This makes my copy of the project file different from the base copy, and I am unable to update the project from subversion.
An update of ...\deps\Microsoft.Practices.ServiceLocation results in:
An update of ...\deps results in:
An update of the root results in:
The messing claiming that the working copy is locked seems to be wrong, executing Release lock on the Microsoft.Practices.ServiceLocation folder results in a message stating "There's nothing to unlock. No file has a lock in this working copy." Same result if I execute the command at the root.
Executing a cleanup changed nothing.
I'm using TortoiseSVN.
- Can I tell Visual Studio 2008 to treat a project/directory as readonly to avoid an upgrade?
- Is there a secret Subversion command I can execute to get this to work?
- Why does an update of files that havnt changed cause a tree conflict?
Edit: I've googled some, and found the Subversion documentation explaining tree conflicts at http://svnbook.red-bean.com/nightly/en/svn.tour.treeconflicts.html. I changed my third question since I dont understand why I'm getting a tree conflict when updating files that havnt changed.