Silverlight项目加载问题 无法读取项目文件“***.csproj”

本文档描述了在尝试加载Silverlight项目时遇到的问题,即无法读取项目文件“CMTM.csproj”,错误提示为找不到指定的Microsoft.Silverlight.CSharp.targets文件。解决方法是手动编辑CMTM.csproj文件,将TargetFrameworkVersion从v4.0改为v3.0。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

无法读取项目文件“CMTM.csproj”。

E:\Code\ConstructionMaterialsTesting\CMTM\CMTM.csproj(786,3): 未找到导入的项目“C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets”。请确认 <Import> 声明中的路径正确,且磁盘上存在该文件。

 

解决办法:用记事本打开CMTM.csproj

<PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{7550E013-535B-47BB-B09A-545621461953}</ProjectGuid>
    <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>NjBestWayOA.Flow</RootNamespace>
    <AssemblyName>NjBestWayOA.Flow</AssemblyName>
    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>                                          //将此处4.0改为3.0即可
    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
    <SilverlightApplication>true</SilverlightApplication>
    <SupportedCultures>zh-Hans</SupportedCultures>
    <XapOutputs>true</XapOutputs>
    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
    <XapFilename>NjBestWayOA.Flow.xap</XapFilename>
    <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
    <SilverlightAppEntry>NjBestWayOA.Flow.App</SilverlightAppEntry>
    <TestPageFileName>NjBestWayOA.FlowTestPage.html</TestPageFileName>
    <CreateTestPage>true</CreateTestPage>
    <ValidateXaml>true</ValidateXaml>
    <EnableOutOfBrowser>false</EnableOutOfBrowser>
    <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
    <UsePlatformExtensions>false</UsePlatformExtensions>
    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
    <LinkedServerProject>
    </LinkedServerProject>
  </PropertyGroup>
  <!-- This property group is only here to support building this project using the
       MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
       to set the TargetFrameworkVersion to v3.5 -->
  <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值