cool hit counter [Handbook] Solving VS publish asp.net project error "No target exists in this project GatherAllFilesToPublish" and subsequent problems_Intefrankly

[Handbook] Solving VS publish asp.net project error "No target exists in this project GatherAllFilesToPublish" and subsequent problems


The solution is at the end.

After opening an asp.net project previously written in VS2010 with VS2017 and setting the publish options (publish to folder), the publish reports an error as shown.

A search was done and the approach found was.

In the project file(xxx.csproj) in, (located) at<Import Project="$(MSBuildBinPath)Microsoft.CSharp.targets" /> Add a<PropertyGroup> Sibling Nodes, Once added, it will look like this:

...
  <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)MicrosoftVisualStudiov$(VisualStudioVersion)</VSToolsPath>
  </PropertyGroup>
  <Import Project="$(MSBuildBinPath)Microsoft.CSharp.targets" />
...

It's done. Save it.> Reload items, Posted again, Still reporting the same error, reopenVS2017 still, Then he opened one withVS2017 new constructionasp.net Project documents, Cross Reference, new project<Import Project=... This place has a total of3 size, as follows:

  <Import Project="$(MSBuildBinPath)Microsoft.CSharp.targets" />
  <Import Project="$(VSToolsPath)WebApplicationsMicrosoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
  <Import Project="$(MSBuildExtensionsPath32)MicrosoftVisualStudiov10.0WebApplicationsMicrosoft.WebApplication.targets" Condition="false" />

And the old project's missing the middle one, So transcribe it., save> reload> issue, That's fine.。 nevertheless, A warning has appeared:

It's disturbing., So compare these nodes of the two projects carefully, Discover the old project's<Import Project="$(MSBuildExtensionsPath32)... The element is missing that lastCondition="false" properties, add into, Release and warning are resolved。

Summarize the approach and take this place for the old project.

<Import Project="$(MSBuildBinPath)Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)MicrosoftVisualStudiov10.0WebApplicationsMicrosoft.WebApplication.targets" />

Replace with.

<PropertyGroup>
  <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
  <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)MicrosoftVisualStudiov$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)WebApplicationsMicrosoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)MicrosoftVisualStudiov10.0WebApplicationsMicrosoft.WebApplication.targets" Condition="false" />

- EOF -


Recommended>>
1、RxSwift MJRefresh build to automatically handle refreshing the state of controls
2、Using ETag for session degradation
3、Interfaced station search built with Solr service in ssh solr2
4、Learning the Web from Scratch jQuery 6 Binding Multiple Identical Events to Elements Unbinding Events
5、 NET Interview Questions Series 12 Preparing for C 30 LINQ

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号