无法打开vs2012 VS2010的csproj文件 [英] can't open vs2010 csproj file in vs2012

查看:262
本文介绍了无法打开vs2012 VS2010的csproj文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

做用的WinForms XNA

doing xna with winforms.

此的微软采样/ winforms_series_1相对=nofollow>链接,它包含在它的三个项目中,项目的形式,内容和ContentLibrary项目的解决方案。

getting the code and how from their programmer, Microsoft from this link, which contains a solution with three projects in it, the form project, the Content and the ContentLibrary project.

ContentLibrary项目建立一个dll了表单项目引用(但不似乎有什么,我不知道为什么)。结果
它引用的内容项目,我从来没有见过这样的bizzare。结果
中的内容项目包含一个图片文件,没有什么别的我不知道这是什么打造。结果
最后形式的项目,该项目包含有许多控制,包括用户自定义的人的主要形式,将一个抽象它继承XNA控制和他人实施该控制(这些会做图纸)。

The ContentLibrary project builds a dll which the form project references(but it doesn't seem to have anything and I don't know why).
It references the Content project in a bizzare way I have never seen.
The Content project contains a picture file, nothing else and I don't know what does it build.
Finally the form project which contains the main form which have many controls including user defined ones, one abstract which inherits xna control, and others to implement this control(these will do the drawing).

无法打开ContentLibrary项目结果
错误消息我。得到:
C:\Program文件(x86)\MSBuild\Microsoft\XNA游戏Studio\Microsoft.Xna.GameStudio.targets未发现证实,声明的路径是正确的并且该文件存在于磁盘

could not open the ContentLibrary project.
the error message I get: C:\Program Files(x86)\MSBuild\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets was not found confirm that the path in the declaration is correct and that the file exists on disk

打开ContentLibrary项目文件( .csproj的一种)用记事本,这里是我发现的:

opening the ContentLibrary project file(.csproj one) with notepad and here's what I found:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{396ADBE6-FB16-4DBA-8C70-C16A46B448EA}</ProjectGuid>
<ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}     </ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ContentLibrary</RootNamespace>
<AssemblyName>ContentLibrary</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
<XnaPlatform>Windows</XnaPlatform>
<XnaProfile>Reach</XnaProfile>
<XnaCrossPlatformGroupID>e0c073d9-a61b-474a-bda0-a8ada2c89669</XnaCrossPlatformGroupID>
<XnaOutputType>Library</XnaOutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>false</XnaCompressContent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\x86\Release</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>true</XnaCompressContent>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.GamerServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Video, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Avatar, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
  <Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
  <Private>False</Private>
</Reference>
<Reference Include="mscorlib">
  <Private>False</Private>
</Reference>
<Reference Include="System">
  <Private>False</Private>
</Reference>
<Reference Include="System.Xml">
  <Private>False</Private>
</Reference>
<Reference Include="System.Core">
  <RequiredTargetFramework>4.0</RequiredTargetFramework>
  <Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq">
  <RequiredTargetFramework>4.0</RequiredTargetFramework>
  <Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Content\Content.contentproj">
  <Project>{618DED89-9BA8-44D7-83A0-163041666FAC}</Project>
  <Name>Content</Name>
  <XnaReferenceType>Content</XnaReferenceType>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
<!--
  To modify your build process, add your task inside one of the targets below and uncomment it. 
  Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
-->
</Project>



可选信息:



在情况需要,我运行Windows 8 64位。

Optional information:

in case needed, I'm running Windows 8 x64.

推荐答案

我在这里找到一个解决方案:
https://bitbucket.org/rbwhitaker/xna-beyond-vs-2010/downloads

I found a solution here: https://bitbucket.org/rbwhitaker/xna-beyond-vs-2010/downloads

中给出的链接包含由PowerShell的推出(类似命令提示符)的脚本文件。如果你运行Windows 7或更高版本你有PowerShell的,如果没有使用此链接:结果
http://www.microsoft.com/en-us/download/details.aspx?id=40855

The link given contains a script file which is launched by PowerShell(similar to command prompt). If you run Windows 7 or later you have PowerShell, if not use this link:
http://www.microsoft.com/en-us/download/details.aspx?id=40855

当你准备好请按照下列步骤操作:

When you're ready follow these steps:


  1. 开启的PowerShell。

  2. 导航至您使用cd命令把脚本。

  3. 运行以下命令:设置ExecutionPolicy不受限制。这是因为PowerShell不会默认激活脚本文件来保护您的计算机时,通过输入完成后,您可以将其改回:设置ExecutionPolicy限制

  4. 使用此命令运行脚本: .\XnaFor2013.ps1

  5. 等待,这需要一定的时间,在我的电脑用了约15分钟。这可能需要更长的时间较慢的计算机。 (我的Windows 8 64位。)

  1. Open PowerShell.
  2. Navigate to where you put the script by using cd command.
  3. Run the following command: Set-ExecutionPolicy Unrestricted. This is because PowerShell doesn't activate script files by default to protect your computer, you can change it back when finished by typing: Set-ExecutionPolicy Restricted
  4. Run the script using this command: .\XnaFor2013.ps1
  5. Wait, it takes some time, on my computer it took about 15 minutes. It may take longer on slower computers. (I had windows 8 64 bit.)

如果你想知道这是什么脚本不向下滚动到页面的结尾:结果
http://rbwhitaker.wikidot.com/setting-up-xna

If you want to know what this script does scroll down to the end of this page:
http://rbwhitaker.wikidot.com/setting-up-xna

摘录,以防止死链接:

首先,它下载在XNA安装微软。

First, it downloads the XNA installer from Microsoft.

原来,在XNA安装程序仅仅是一个自解压存档
包含有关其他七个安装程序。因此,
脚本执行接下来的事情就是解开这些内部的安装程序。

It turns out that the XNA installer is just a self-extracting archive that contains about seven other installers. So the next thing the script does is unpack those "internal" installers.

七六你想要什么他们做,出来的中,
这样的脚本运行他们每人轮流。

Six of the seven do exactly what you want them to do, out of the box, so the script runs them each in turn.

另一种是在
的Visual Studio放置在正确的位置的文件安装程序。不幸的是,在寻找的Visual Studio 2010,
,而你已经有了一个较新的版本(2012年或2013年的
脚本都工作)。因此,该脚本告诉此安装程序,只是放在
A临时位置的文件。

The other one is the installer that places files in the right place in Visual Studio. Unfortunately, it's looking for Visual Studio 2010, while you've got a newer version (2012 or 2013 both work with the script). So the script tells this installer to just place the files in a temporary location.

这些文件是专门为Visual Studio 2010和需要做出一些更改,
以便脚本使得变化,并将其放置在适当的
座为您的Visual Studio版本。 (事实上​​,它会为你已经安装了Visual Studio中的所有
版本,无论$ B $乙是2012年或2013年,也无论它是否是一个付费版或特快
为Windows桌面上。)

These files are built for Visual Studio 2010 and require some changes, so the script makes the changes and places them in the appropriate place for your version of Visual Studio. (In fact, it does it for all versions of Visual Studio you've got installed, regardless of whether it's 2012 or 2013, and regardless of if it's a paid version or Express for Windows Desktop.)

不幸的是,Visual Studio将不会自动检查新的
加载项。 (其实,这是一件好事,因为它会花很长时间
,检查所有的时间,但在这种情况下,这是不好的,因为我们需要它
检查)。为了使检查新插件,脚本删除
扩展缓存,并拥有Visual Studio的重建。重建缓存
最需要的脚本运行的时间。 (几分钟)。

Unfortunately, Visual Studio doesn't automatically check for new add-ons. (Actually, that's a good thing because it would take too long to check all the time, but in this case, it's bad because we need it to check.) To make it check for new addons, the script deletes the extension cache and has Visual Studio rebuild it. Rebuilding the cache takes most of the time that the script runs for. (Several minutes.)

一旦它的重建,一切都已经准备就绪,脚本删除
,它创建的临时文件。

Once it's rebuilt, everything is ready to go, and the script deletes the temporary files that it created.

这篇关于无法打开vs2012 VS2010的csproj文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆