Build Failure. Error: 'path' cannot be an

2020-05-21 07:18发布

I have a solution that builds fine in VS2015. I just installed VS2017 RTM and after conversion, attempts to build the solution fail immediately with the error:

Build Failure. Error: 'path' cannot be an empty string ("") or start with the null character.

How can I get around this?

5条回答
地球回转人心会变
2楼-- · 2020-05-21 07:59

I also had this problem with all of my VS2015 (aka project.json) - projects. Deleting the .vs folder didn't solve the problem.

I finally come up with disabling the "lightweight solutions load" checkbox under Tools -> Options -> Projects and Solutions -> Lightweight solution load for all solutions

查看更多
叼着烟拽天下
3楼-- · 2020-05-21 08:06

The problem seems to be with the new lightweight solution loading feature of VS2017.

To fix it, first clean up:

  • Close Visual Studio 2017
  • Delete or rename the .vs folder
  • Reopen the solution

Afterwards, don't re-enable lightweight solution loading for that solution.

You can completely disable lightweight solution loading for all solutions in the options, but if the problem only applies to some solutions then that might be a bit heavy handed.

查看更多
放我归山
4楼-- · 2020-05-21 08:09

I ran into the same problem in visual studio 2017, with a large solution that loaded light weight. I looked at :https://developercommunity.visualstudio.com/content/problem/15861/unable-to-build-solution-after-upgrading-to-the-la.html

And they also suggest not to light weight load solution:
a) right click on you solution
b) disable the lightweight loading
c) close the solution
d) reload and recompile the solution.

查看更多
The star\"
5楼-- · 2020-05-21 08:13

These solutions didn't work for me, but I found .vs\config\applicationhost.config and it had

    <location path="" overrideMode="Allow">

I added the folder to which I would deploy the project, and it built. (or would have if I didn't have compiler errors :)

查看更多
你好瞎i
6楼-- · 2020-05-21 08:24

I ran into this problem with a bad bower.json configuration. Back up the bower.json file and clear the dependencies. See if that removes the error. If so, re-add the dependencies one by one until the problem goes awa

查看更多
登录 后发表回答