Unable to open configSource file that was added as link

前端 未结 6 897
走了就别回头了
走了就别回头了 2021-02-07 08:54

In my MVC application I use external config files to keep clean web.config. Some files are common and I added them to project as link from one location. For those files I set Co

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-07 09:41

    I suffered from the same problem. In my case, config file's 'Build Action' property was the cause. ( Right click on the config file > Properties > Build Action )

    The 'Build Action' value was set to 'None'. After I changed it to 'Content', the problem sovled. ( I am not sure if it was 'a Visual Studio's bug' or 'my click-by-mistake' that made it set to 'None'.

提交回复
热议问题