Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When adding an existing item with "Add as Link", this file is not compiled in VS2015?

When adding an existing item with "Add as Link", this file is not compiled in VS2015 ?

enter image description here

like image 227
Stef Heyenrath Avatar asked Jan 27 '15 16:01

Stef Heyenrath


1 Answers

Indeed, this is not yet supported. I contacted the engineering owners of this feature and they are investigating what it would take to support this.

You can manually add a "linked" file in the project.json file:

{
    ... other stuff ...

    "compile": [
        "../path/to/somewhere.cs",
        "../../another/path/to/file.cs",
        "../../use/globbing/**/*.cs"
    ],

    ... other stuff ...
}

The schema for the file is available here: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/project.json#L98-L119

And in Visual Studio while editing a project.json file you'll see this same schema in Intellisense.

like image 189
Eilon Avatar answered Jan 01 '23 12:01

Eilon