none
Getting an error whenever I open a project, saying it cannot find the App.Config file

    Question

  • Our practice is to take a base solution/project, branch it, and then start working on an entirely new application. Perhaps this isn't the best use of TFS (or any other source control), but that's what we're doing.

    What this results in, I've found, is having a LOT of solutions/projects being listed in Visual Studio all with the same name. You've no idea how often I've opened the wrong one, thinking I was working on the project I wanted to work on.

    So I got tired of doing that. I've renamed the solution and project files (the main project and the unit test project) to what we really want the name to be. The old project name was CoreFramework, the new name is LRAT. I did this from within VS 2015, hoping that it would take care of everything it needed to. Well, I was mistaken in that hope. I've gone through and (I hope) renamed all of the namespaces, etc., throughout the whole solution/projects.

    This seems to be OK, with one odd thing, which I cannot figure out is the issue. Every time I hope LRAT in VS 2015 I always get this message displayed to me in VS's Output window:


    Could not find file 'D:\Src\LRAT\Labor Relations Action Tracker (LRAT)\LRAT\CoreFramework\App.config'.


    I've tried searching for "CoreFramework" and "App.config", using Find and Replace, running against the solution. It never finds either string. So how to I find where VS is constructing that string to try and find App.Config? It does exist in the folder its supposed to be in which is 'D:\Src\LRAT\Labor Relations Action Tracker (LRAT)\LRAT\LRAT\App.config'


    Rod

    Wednesday, January 18, 2017 10:07 PM

Answers

All replies

  • Hi Rod,

    >>The old project name was CoreFramework, the new name is LRAT. I did this from within VS 2015, hoping that it would take care of everything it needed to. Well, I was mistaken in that hope. I've gone through and (I hope) renamed all of the namespaces, etc., throughout the whole solution/projects.

    According to your description, whether you want to rename the all namespace in WFP project? In my side I could rename them manually.

    >>Could not find file 'D:\Src\LRAT\Labor Relations Action Tracker (LRAT)\LRAT\CoreFramework\ App.config'.

    Whether in your project has App.config file? If not, we could add a App.config file through VS, please refer to the following steps:

    Right-click the project name->choose Add->New Item->Application Configuration File.

    You could put this file in that folder.

    If I misunderstand your issue, please feel free to let me know. And you had better share me detailed steps to help me repro your issue in my side.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.




    Thursday, January 19, 2017 7:43 AM
    Moderator
  • Thank you Oscar, for your response. The App.Config file is already in the project. At this it appears that way to me. When I have look at Solution Explorer App.Config is right there, in the project and in the correct folder. That's why this is so mysterious - how can it both be in the correct place and not be in the correct place?

    Rod

    Thursday, January 19, 2017 3:04 PM
  • Hi Rod,

    I have read your question again, here is my opinions:

    1). If you want LRAT project to integrate to the main branch, please do not do this. Please using the original solution and project and do not change their name.

    2). If you do not want LRAT project to integrate to the main branch, please create a new main branch.

    Above two suggestions are the recommend during the developing, which could help your avoid some unnecessary trouble. :)

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, January 20, 2017 7:53 AM
    Moderator
  • Hi Rod,

    I have read your question again, here is my opinions:

    1). If you want LRAT project to integrate to the main branch, please do not do this. Please using the original solution and project and do not change their name.

    2). If you do not want LRAT project to integrate to the main branch, please create a new main branch.

    Above two suggestions are the recommend during the developing, which could help your avoid some unnecessary trouble. :)

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Oscar, I agree with me. But I am not the one making policy, as far as branching goes.

    Rod

    Sunday, January 22, 2017 2:51 PM
  • check your .sln and .csproj files
    • Marked as answer by Rod at Work Monday, January 23, 2017 8:42 PM
    Sunday, January 22, 2017 3:15 PM
  • With a text editor. Renaming does not change the paths in these files.
    • Marked as answer by Rod at Work Monday, January 23, 2017 8:43 PM
    Sunday, January 22, 2017 3:25 PM