Visual Studio升级错误

时间:2017-02-15 11:17:04

标签: visual-studio

我已将Visual Studio从2010年升级到2015年,但我发现项目不兼容的错误如下所示:

enter image description here

当我在这里打开****。csproj_deploy.wdproj文件的内容时,公司名称被编辑:

<?xml version="1.0" encoding="utf-8"?>
<!-- 
  Microsoft Visual Studio 2008 Web Deployment Project 
  http://go.microsoft.com/fwlink/?LinkID=104956

-->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectName>*********</ProjectName>
    <BuildDir>..\..\..\..\target</BuildDir>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>10.0.30319</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{4981E0AB-A55B-46AE-B55F-B607E3B4EAA5}</ProjectGuid>
    <SourceWebPhysicalPath>..\..\webapp</SourceWebPhysicalPath>
    <SourceWebProject>{BF29C57D-D568-4195-9DE5-E5F179E19A0C}|src\main\webapp\*********.csproj</SourceWebProject>
    <SourceWebVirtualPath>/*********.csproj</SourceWebVirtualPath>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>$(BuildDir)\$(Configuration)</OutputPath>
    <EnableUpdateable>true</EnableUpdateable>
    <UseMerge>true</UseMerge>
    <SingleAssemblyName>*********.csproj_deploy</SingleAssemblyName>
    <DeleteAppCodeCompiledFiles>false</DeleteAppCodeCompiledFiles>
    <UseWebConfigReplacement>false</UseWebConfigReplacement>
    <DeleteAppDataFolder>false</DeleteAppDataFolder>
    <VirtualDirectoryAlias>
    </VirtualDirectoryAlias>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugSymbols>false</DebugSymbols>
    <OutputPath>$(BuildDir)\$(Configuration)</OutputPath>
    <EnableUpdateable>true</EnableUpdateable>
    <UseMerge>true</UseMerge>
    <SingleAssemblyName>*********.csproj_deploy</SingleAssemblyName>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'goss-test|AnyCPU' ">
    <EnableUpdateable>true</EnableUpdateable>
    <UseMerge>true</UseMerge>
    <UseWebConfigReplacement>false</UseWebConfigReplacement>
    <SingleAssemblyName>*********.csproj_deploy</SingleAssemblyName>
    <OutputPath>$(BuildDir)\$(Configuration)</OutputPath>
    <DeployPath>E:\dotnet-sites\eastrenintranet</DeployPath>
    <DebugSymbols>false</DebugSymbols>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == '*********-intranet-dev|AnyCPU' ">
    <EnableUpdateable>true</EnableUpdateable>
    <UseMerge>true</UseMerge>
    <UseWebConfigReplacement>false</UseWebConfigReplacement>
    <SingleAssemblyName>*********.csproj_deploy</SingleAssemblyName>
    <OutputPath>$(BuildDir)\$(Configuration)</OutputPath>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == '*********-intranet-live|AnyCPU' ">
    <EnableUpdateable>true</EnableUpdateable>
    <UseMerge>true</UseMerge>
    <UseWebConfigReplacement>false</UseWebConfigReplacement>
    <SingleAssemblyName>*********.csproj_deploy</SingleAssemblyName>
    <OutputPath>$(BuildDir)\$(Configuration)</OutputPath>
  </PropertyGroup>
  <ItemGroup>
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\.svn\**\*" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\bin\*.xml" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\lucene\**\*" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\media\**\*" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\obj\**\*" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\*.csproj" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.user" />
    <ProjectReference Include="..\..\webapp\*********.csproj">
      <Project>{BF29C57D-D568-4195-9DE5-E5F179E19A0C}</Project>
      <Name>*********</Name>
    </ProjectReference>
        <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\cache\**\*" />
        <ProjectReference Include="..\..\webapp\*********.csproj">
            <Project>{BF29C57D-D568-4195-9DE5-E5F179E19A0C}</Project>
            <Name>eastren-intranet</Name>
        </ProjectReference>
  </ItemGroup>
    <ItemGroup>
        <IncludeInBuild Include="$(SourceWebPhysicalPath)\**\*" Exclude="@(ExcludeFromBuild)" />
    </ItemGroup>
    <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
    <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
    <Target Name="CopyFilesToOutputDirectory" BeforeTargets="Rebuild">
        <Copy SourceFiles="@(IncludeInBuild)" DestinationFolder="$(BuildDir)\$(Configuration)\%(RecursiveDir)" />
    </Target>
    <Target Name="BeforeBuild">
        <RemoveDir Directories="$(BuildDir)" />
    </Target>
    <Target Name="BeforeMerge">
    </Target>
    <Target Name="AfterMerge">
    </Target>
    <Target Name="Rebuild" BeforeTargets="BeforeBuild">
        <Message Text="*** Target: Rebuild - BEGIN" />
        <!-- Copy in any configuration files overwriting any previous ones -->
        <ItemGroup>
            <ConfigFiles Include="..\..\config\$(Configuration)\**\*.*" Exclude="..\..\config\$(Configuration)\**\.svn\**" />
        </ItemGroup>
        <Message Text="*** Target: Rebuild - Copying configuration files" />
        <Copy SourceFiles="@(ConfigFiles)" DestinationFolder="$(BuildDir)\$(Configuration)\%(RecursiveDir)" />
        <!-- Create a ZIP archive of the entire built site -->
        <ItemGroup>
            <ZipFiles Include="$(BuildDir)\$(Configuration)\**\*.*" />
        </ItemGroup>
        <MakeDir Directories="$(BuildDir)" Condition="!Exists('$(BuildDir)')" />
        <Message Text="*** Target: Rebuild - Zipping work directory $(BuildDir)\$(Configuration)\ " />
        <Zip Files="@(ZipFiles)" WorkingDirectory="$(BuildDir)\$(Configuration)\" ZipFileName="$(BuildDir)\$(ProjectName)-$(Configuration)$(Version).zip" ZipLevel="9" />
        <!-- Auto deploy new site if on test -->
        <ItemGroup Condition="$(DeployPath) != ''">
            <SiteFiles Include="$(DeployPath)\**\*.*" Exclude="$(DeployPath)\.htaccess" />
        </ItemGroup>
        <Message Text="*** Target: Rebuild - Removing deployment directory $(DeployPath) " />
        <Delete Condition="$(DeployPath) != ''" Files="@(SiteFiles)" />
        <Message Text="*** Target: Rebuild - Unzipping site file $(DeployPath) " />
        <Unzip Condition="$(DeployPath) != ''" ZipFileName="$(BuildDir)\$(ProjectName)-$(Configuration)$(Version).zip" TargetDirectory="$(DeployPath)" />
        <Message Text="*** Target: Rebuild - END " />
    </Target>
 </Project>

如何解决此问题?

我可以构建解决方案,没有任何错误,并且站点在localhost上显示正常。 MSBUILD也运行良好,从表面上看,我无法看到输出问题。

请告知

感谢

1 个答案:

答案 0 :(得分:0)

Visual Studio 2013/2015不支持开箱即用的安装和部署项目。安装扩展程序以启用它们:

https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2015InstallerProjects