前几天我在一台式机上用Blend处理了一下silverlight工程,保存了。
后来打开的时候,一直报什么安全问题。我没有在意。因为我点击确定后,该项目既能调试也能运行我就没有在意。可是今天我把该工程拷贝到一个笔记本上去运行,结果打开工程失败,也没与写原因。
最后我就找到该工程的.csproj文件,打开后,
<Project Toolsversion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">Anycpu</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{22F71354-B52F-4B14-847A-E81F5AE2D79B}</ProjectGuid>
<ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>###</RootNamespace>
<AssemblyName>###</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<SilverlightApplication>true</SilverlightApplication>
<SupportedCultures>zh-Hans</SupportedCultures>
<XapOutputs>true</XapOutputs>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
<XapFilename>###.xap</XapFilename>
<SilverlightManifestTemplate>Properties/AppManifest.xml</SilverlightManifestTemplate>
<SilverlightAppEntry>###.App</SilverlightAppEntry>
<TestPageFileName>TestPage.html</TestPageFileName>
<CreateTestPage>true</CreateTestPage>
<ValidateXaml>true</ValidateXaml>
<EnableOutOfbrowser>false</EnableOutOfbrowser>
<OutOfbrowserSettingsFile>Properties/OutOfbrowserSettings.xml</OutOfbrowserSettingsFile>
<UsePlatformExtensions>false</UsePlatformExtensions>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<LinkedServerProject>
</LinkedServerProject>
<ExpressionBlendVersion>3.0.1938.0</ExpressionBlendVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Anycpu' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin/Release/</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Anycpu' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin/Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FloatableWindow,Version=2.0.5.0,Culture=neutral,PublicKeyToken=dd6e2c92abf74ba1,processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>../../../../项目文档/实例/浮动窗口/FloatableWindow.dll</HintPath>
</Reference>
<Reference Include="GIFDecoder,Version=1.0.0.0,processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>../../../../项目文档/实例/读取图片/GIFDecoderSample/GIFDecoder/Bin/Debug/GIFDecoder.dll</HintPath>
</Reference>
<Reference Include="SLVisifire.Charts,Version=2.2.9.0,PublicKeyToken=e1555b029ff71bd3,processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:/SuperMap/SuperMapiServerJava6R/iClient/forSilverlight/lib/SLVisifire.Charts.dll</HintPath>
</Reference>
<Reference Include="SuperMap.Web,Version=6.0.0.6524,PublicKeyToken=1b8ee0f6e59677a8,processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:/SuperMap/SuperMapiServerJava6R/iClient/forSilverlight/lib/SuperMap.Web.dll</HintPath>
</Reference>
<Reference Include="SuperMap.Web.Controls,processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:/SuperMap/SuperMapiServerJava6R/iClient/forSilverlight/lib/SuperMap.Web.Controls.dll</HintPath>
</Reference>
<Reference Include="SuperMap.Web.IS6,processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:/SuperMap/SuperMapiServerJava6R/iClient/forSilverlight/lib/SuperMap.Web.IS6.dll</HintPath>
</Reference>
<Reference Include="System.Windows" />
<Reference Include="mscorlib" />
<Reference Include="system" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
<Reference Include="System.Windows.Controls,PublicKeyToken=31bf3856ad364e35" />
<Reference Include="System.Windows.Controls.Data,PublicKeyToken=31bf3856ad364e35" />
<Reference Include="System.Windows.Controls.Data.Input,PublicKeyToken=31bf3856ad364e35,processorArchitecture=MSIL" />
<Reference Include="System.Windows.Controls.Input,processorArchitecture=MSIL" />
<Reference Include="System.Windows.Controls.Navigation,processorArchitecture=MSIL" />
<Reference Include="System.Windows.Interactivity,processorArchitecture=MSIL" />
<Reference Include="System.Xml" />
<Reference Include="System.Windows.browser" />
<Reference Include="System.Xml.Linq,processorArchitecture=MSIL" />
</ItemGroup>
<ItemGroup>
<ApplicationDeFinition Include="App.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:MarkupCompilePass1</Generator>
</ApplicationDeFinition>
<Page Include="Assets/Style1.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:MarkupCompilePass1</Generator>
</Page>
<Page Include="Assets/Style2.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:MarkupCompilePass1</Generator>
</Page>
<Page Include="Assets/Styles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:MarkupCompilePass1</Generator>
</Page>
<Page Include="CityMoniter.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:MarkupCompilePass1</Generator>
</Page>
<Page Include="MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:MarkupCompilePass1</Generator>
</Page>
<Page Include="Test.xaml">
<Generator>MSBuild:MarkupCompilePass1</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ToolTipExpand.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:MarkupCompilePass1</Generator>
</Page>
<Page Include="WelcomePage.xaml">
<Generator>MSBuild:MarkupCompilePass1</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Properties/AppManifest.xml" />
</ItemGroup>
<ItemGroup>
<Resource Include="images/Station.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="images/xuanfu002_03.png" />
<Resource Include="images/xuanfu002_05.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)/Microsoft/Silverlight/v3.0/Microsoft.Silverlight.CSharp.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>
-->
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
<SilverlightProjectProperties />
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Import Project="$(MSBuildExtensionsPath)/Microsoft/Expression/Blend/3.0/Silverlight/Microsoft.Expression.Blend.Silverlight.targets" />
</Project>
我经过仔细检查,发现上面标红色的这句话有问题,因为我的笔记本机器上没有Blend,所以就报错了。我把它删掉后重新打开工程,就没有可以了。
希望看到我日志的朋友,如果你的工程也是和我类似,因为在别的环境中用过,而无法打开工程。就打开该文件找到相应的Import语句,把她删掉(即删掉有问题的语句)。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。