Contentfile in nuget gets compiled causing build errors RRS feed

  • Question

  • I have a nuget that has a contentfile in it. It is a json file and denoted in the nuspec file when the nuget is packed.

    When installing the nuget in a regular wpf app, I get a couple build errors. It appears that Visual Studio is trying to compile the .json file. Wondering if anyone knows what may cause this??? As you'll see in the nuspec snippet I have BuildAction=None in the nuspec

    ContentFile.json(1,1,1,2): error CS1022: Type or namespace definition, or end-of-file expected
    ContentFile.json(4,16,4,26): error CS1001: Identifier expected
    ContentFile.json(4,37,4,45): error CS1001: Identifier expected

    Allen Thurman

    Allen Thurman

    • Moved by Alex-KSGZ Tuesday, February 18, 2020 2:39 AM
    Friday, January 31, 2020 4:19 PM

All replies

  • Hi,

    This forum is discussing and asking questions about the WPF,but your issue seems to have nothing to do with wpf.

    Best Regards,


    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.

    Monday, February 3, 2020 4:57 AM