c# - How to reference System.DirectoryServices assemblies using Visual Studio Code? -
i reference system.directoryservices
in asp.net web application. follow tutorial on active directories (https://msdn.microsoft.com/en-us/library/ms180890(v=vs.90).aspx) having issue adding reference system.directoryservices.dll. think should adding project.json various issues adding dependency appropriate location. project.json follows.
{ "usersecretsid": "aspnet-formsauthad-b19f2b08-0c89-4f46-af20-dc7b20b2226d", "dependencies": { "microsoft.netcore.app": { "version": "1.0.0", "type": "platform" }, "microsoft.aspnetcore.authentication.cookies": "1.0.0", "microsoft.aspnetcore.diagnostics": "1.0.0", "microsoft.aspnetcore.diagnostics.entityframeworkcore": "1.0.0", "microsoft.aspnetcore.identity.entityframeworkcore": "1.0.0", "microsoft.aspnetcore.mvc": "1.0.0", "microsoft.aspnetcore.razor.tools": { "version": "1.0.0-preview2-final", "type": "build" }, "microsoft.aspnetcore.server.iisintegration": "1.0.0", "microsoft.aspnetcore.server.kestrel": "1.0.0", "microsoft.aspnetcore.staticfiles": "1.0.0", "microsoft.entityframeworkcore.sqlite": "1.0.0", "microsoft.entityframeworkcore.sqlite.design": { "version": "1.0.0", "type": "build" }, "microsoft.entityframeworkcore.tools": { "version": "1.0.0-preview2-final", "type": "build" }, "microsoft.extensions.configuration.environmentvariables": "1.0.0", "microsoft.extensions.configuration.json": "1.0.0", "microsoft.extensions.configuration.commandline": "1.0.0", "microsoft.extensions.configuration.usersecrets": "1.0.0", "microsoft.extensions.logging": "1.0.0", "microsoft.extensions.logging.console": "1.0.0", "microsoft.extensions.logging.debug": "1.0.0", "microsoft.extensions.options.configurationextensions": "1.0.0", "microsoft.visualstudio.web.browserlink.loader": "14.0.0", "microsoft.visualstudio.web.codegeneration.tools": { "version": "1.0.0-preview2-final", "type": "build" }, "microsoft.visualstudio.web.codegenerators.mvc": { "version": "1.0.0-preview2-final", "type": "build" } }, "tools": { "bundlerminifier.core": "2.0.238", "microsoft.aspnetcore.razor.tools": "1.0.0-preview2-final", "microsoft.aspnetcore.server.iisintegration.tools": "1.0.0-preview2-final", "microsoft.entityframeworkcore.tools": "1.0.0-preview2-final", "microsoft.extensions.secretmanager.tools": "1.0.0-preview2-final", "microsoft.visualstudio.web.codegeneration.tools": { "version": "1.0.0-preview2-final", "imports": [ "portable-net45+win8" ] } }, "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "portable-net45+win8" ] } }, "buildoptions": { "emitentrypoint": true, "preservecompilationcontext": true }, "runtimeoptions": { "configproperties": { "system.gc.server": true } }, "publishoptions": { "include": [ "wwwroot", "views", "areas/**/views", "appsettings.json", "web.config" ] }, "scripts": { "precompile": [ "dotnet bundle" ], "prepublish": [ "bower install" ], "postpublish": [ "dotnet publish-iis --publish-folder %publish:outputpath% --framework %publish:fulltargetframework%" ] }, "tooling": { "defaultnamespace": "formsauthad" } }
where , how should add system.directoryservices
dependency project.json?
you use frameworkassemblies
section in project.json framework targeting. example:
"frameworks": { "net462": { "frameworkassemblies": { "system.directoryservices": { "type": "build", "version": "4.0.0" } } } }
keep in mind doing this, referencing assembly in gac full .net framework. means project not run on .net core anymore , run on windows. system.directoryservices
not support .net core yet.
Comments
Post a Comment