c# - .NET Core exclude a class from project -


how can exclude class project in .net core

i don't see context-menu option in visual studio 2015 excluding file.

read couple of areas on how exclude https://github.com/aspnet/home/issues/1464 , tried following

{   "version": "1.0.0-*",    "dependencies": {     "htmlagilitypack.netcore": "1.5.0.1",     "microsoft.entityframeworkcore": "1.0.0",     "microsoft.entityframeworkcore.sqlserver": "1.0.0",     "microsoft.extensions.configuration": "1.0.0",     "microsoft.extensions.configuration.abstractions": "1.0.0",     "microsoft.extensions.configuration.json": "1.0.0",     "microsoft.extensions.dependencyinjection": "1.0.0",     "netstandard.library": "1.6.0",     "system.linq": "4.1.0",     "system.xml.xmlserializer": "4.0.11"   },    "frameworks": {     "netstandard1.6": {       "imports": "dnxcore50"     }   },   "buildoptions": {     "compile": {       "excludefiles": [         "security/securityutility.cs",         "httpcontext/contextutility.cs",         "excel/parse.cs"       ]     }   } } 

this exclude section, since have compile time errors in files, want exclude files , continue project.

"buildoptions": {     "compile": {       "excludefiles": [         "security/securityutility.cs",         "httpcontext/contextutility.cs",         "excel/parse.cs"       ]     }   } 

but doesn't seems working.

well, can't remove file project in *.csproj projects.

in *.xproj/project.json projects files included default.

the compile exclude , excludefiles options compiler, when build project.

when you're in visual studio roslyn compile/validate syntax edit, believe there no way prevent/exclude within visual studio, other commenting out whole file/affected code.

you can still compile code if visual studio/roslyn shows red curly errors lines, when exclude file. tested it.

but it's annoying.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -