wpf error reading content of sorce file productname.assembliyinfo.cs

mion shion 241 Reputation points
2023-02-18T19:19:24.05+00:00

Good evening,

i have a issue here where my designer is showing,

error reading content of source file ( filepath to debug folder ) + project_alice.Assemblyinfo.cs

i have no idea why this has randomly removed or come up with this error all i did was restart vs and its come up with this and i not sure if i can manually make it or not have checked online does not seem to tell me the content of it,

has anyone else sorted this or had this issue before

Kind regards,

Mion Shion
aka elfenliedtopfan5

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,106 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,908 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 30,566 Reputation points Microsoft Vendor
    2023-02-20T08:11:53.4233333+00:00

    Hello @mion shion ,

    Welcome to Microsoft Q&A forum.

    Please check following suggestions and let us know if the issue disappears:

    Create a new project and check if the same error appears.

    If the same error appears, please try following:

    1. Repair VS from VS Installer => More => Repair.
    2. Create another new project and save it to another clean folder and open to check if the error persists.
    3. Update VS.
    4. Disable installed extensions temporarily and test again.

    If the same error doesn’t appear, please try following:

    1. Unload and reload your project(right-click your project => Unload Project => right-click it again => Reload Project).
    2. Clean, manually remove cache files/folders(.vs, bin, obj folders) and rebuild your project(Build => Clean Solution, Build => Rebuild Solution).
    3. If you changed any codes, or settings in your project, please let us know.

    Feel free to contact us.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Jan Walter Benjamins 0 Reputation points
    2023-04-18T06:38:00.3033333+00:00

    I have the same kind of problem. First I got 52 build errors (most of them stacktrace lines from an exception in Roslyn), that appeared to match https://github.com/dotnet/roslyn/issues/43524 Removing all contents of bin, obj and .vs, then cleaning did not help. I think the problem appeared after installing the Community Toolkit (used to work with MvvmLight a lot, but that is now obsolete). After removing the package from the solution I ended up with just 2 ot of the previous 52 errors, being obj\Debug\netcoreapp3.1\AssemblyInfo.cs could not be found. There is an assemblyinfo.cs in my project. Copying it manually to the folder under obj does not help either


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.