Windows error 0x80131515, -2146233067

Detailed Error Information

COR_E_NOTSUPPORTED[1]

Message"Operation is not supported."
Comment The operation is not supported

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode19 (0x013)
NameFACILITY_URT[2][3]
DescriptionThe source of the error code is .NET CLR.[2][3]
Error Code5397 (0x1515)

Questions

106votes
13answers

VSTS 2010 SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x80131515)

I am experiencing a strange issue with VS2010. We use TFS to build our API dlls and we used to reference them in our projects usign a mapped network drive that was fully trusted. We have been working like that for at least two years and everything worked perfectly. Today, [...] read more
visual-studio-2010
msbuild
.net-4.0
tfsbuild
sgen
77votes
10answers

Could not load file or assembly HRESULT: 0x80131515 (When adding controller to MVC project that has assembly references on network drive)

I've seen this: VSTS 2010 SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x80131515) and none of the answers work. It also doesn't appear when I build or anything. I can run the project fine, it happens when I try to add an entity framework [...] read more
asp.net-mvc
visual-studio-2010
assemblies
.net-assembly
77votes
11answers

Cannot install windows service

I have created a very simple window service using visual studio 2010 and .NُET 4.0. This service has no functionality added from the default windows service project, other than an installer has been added. If I run "installutil.exe appName.exe" on my dev box or other windows 2008 R2 machines in [...] read more
c#
windows-services
.net-4.0
installutil
67votes
5answers

Visual Studio "Could not load file or assembly. Operation is not supported" error in Release mode

I have a small project in C# that uses two external dll files. One is the Redmine.Net.Api.dll and the other is NLog.dll. I'm using Visual Studio 2010. I added both files as Reference to my project. The problem is that when I run the project in Debug mode, it compiles, [...] read more
c#
visual-studio-2010
50votes
4answers

Could not load file or assembly Operation is not supported. (Exception from HRESULT: 0x80131515)

When I run CodedUI Test from a small Console tool via vstest.console.exe from a scheduled task I sometimes see this error message on different PCs: > error : Could not load file or assembly 'file:///C:\foobar.dll' or one of its > dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) Why/what [...] read more
.net
visual-studio-2012
scheduled-tasks
coded-ui-tests
20votes
2answers

JWT error IDX10634: Unable to create the SignatureProvider C#

I'm trying to run my app but it get stuck with the following error: > System.NotSupportedException HResult=0x80131515 Message=IDX10634: Unable to > create the SignatureProvider. Algorithm: '[PII is hidden by default. Set the > 'ShowPII' flag in IdentityModelEventSource.cs to true to reveal it.]', > SecurityKey: '[PII is hidden by default. Set [...] read more
c#
jwt
19votes
9answers

Why is there an Error in ef Add-Migration

I have several class files. Now I am adding a new model class and tried to type add-migration InitialCreate but am getting the following error: PM> add-migration InitialCreate Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\Users\user\Documents\Visual Studio 2013\Pro jects\DigitalHealthWebPrev\packages\EntityFramework.6.1.3\tools\EntityFramework.PowerShell.Utility.dll' or one of its dependencies. Operati [...] read more
entity-framework
asp.net-mvc-5
entity-framework-migrations
19votes
3answers

Powershell load dll got error: Add-Type : Could not load file or assembly 'WebDriver.dll' or one of its dependencies. Operation is not supported

I want to use PowerShell with selenium and download selenium from http://www.java2s.com/Code/Jar/s/Downloadseleniumremotedriver2350jar.htm . When I try to load one of the dlls, I got errors. Hope someone can help me with it. This is my system info. OS Name: Microsoft Windows 7 Enterprise OS Version: 6.1.7601 Service Pack 1 Build [...] read more
powershell
dll
selenium
add-type
13votes
7answers

Enabling Code First Entity Framework VS Web Express 2012

I am trying to enable Code First in my Visual Studio Web Express 2012. From what I have read so far I have to use the Package Manager Console and the command Enable-Migrations. When I do this I get the following error. Exception calling "LoadFrom" with "1" argument(s): "Could not [...] read more
asp.net
entity-framework
visual-studio-2012
entity-framework-migrations
13votes
5answers

PowerShell runtime exception - "could not load file or assembly"

This seems to be a common problem in PowerShell and Visual Studio, yet cases and solutions seem to vary a lot. Though seeing several similar questions, I didn't find a working solution for my issue yet. The problem exists in the error message > Could not load file or assembly [...] read more
exception
powershell
winscp
winscp-net
8votes
5answers

PowerShell Import DnsShell Module

So here's the list of available modules in this directory. As you can see DnsShell is there. PS C:\windows\system32> Get-Module -ListAvailable Directory: C:\windows\system32\WindowsPowerShell\v1.0\Modules ModuleType Name ExportedCommands ---------- ---- ---------------- Manifest ActiveDirectory {Get-ADRootDSE, New-ADObject, Rename- ADObject, Move-ADObject...} Manifest AppLocker {Set-AppLockerPolicy, Get-AppLockerPolicy, Test-AppLockerPolicy, Get-AppLo... Manifest BitsTransfer {Add-BitsFile, Remove-BitsTransfer, Complete-BitsTransfer, Get-BitsTransfe... Manifest CimCmdlets [...] read more
powershell
6votes
5answers

Error on Enable-Migrations

I'm new with EF and I have an error when I try to run Enable-Migrations in PMC console : Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///...\pa ckages\EntityFramework.6.0.1\tools\EntityFramework.PowerShell.Utility.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)" At ...\packages\EntityFramework.6.1.1\tools\EntityFramework.psm1:780 char:62 + [...] read more
c#
.net
entity-framework
asp.net-mvc-4
6votes
3answers

Add-Type load assembly from network UNC share error 0x80131515

When you want to add an assembly from a network UNC share using the command: $scriptPath = Split-Path ($MyInvocation.MyCommand.Path) Add-Type -path "$scriptPath\selenium-dotnet\net40\WebDriver.dll" you might face such an error: Add-Type: Could not load file or assembly 'file:///Z:\A-Backup\Users\Administr ator\Desktop\MAXIMO Automatic\selenium-dotnet\net40\WebDriver.dll' or one of it s dependencies. Operation is not supported. (Exception from [...] read more
powershell
selenium
add-type
6votes
5answers

Could not load file or assembly (nopcommerce 3.5) when changing to release

I have a new nopcommerce 3.5 website that i want to publish and on debug it all was well but as soon i changed to release im getting this error Error 1 Could not load file or assembly 'file:///C:\Users\User\Desktop\nop\packages\Autofac.3.5.2\lib\net40\Autofac.dll' or one of its dependencies. Operation is not supported. (Exception from [...] read more
asp.net-mvc
visual-studio-2013
asp.net-mvc-5
nopcommerce
5votes
3answers

Powershell: Execute exe on remote server and capture output

I am trying to script the execution of an installer on remote web servers. The installer in question is also a Windows Service that hosts NServiceBus. If RDP'd into the server, the application is installed by the following command: > &"$theInstaller" /install /serviceName:TheServiceName The installer prints output about its progress [...] read more
powershell
remote
5votes
1answer

EF Core 2.0 - System.NotSupportedException On Add

I am using EF Core 2.0. I have a table with 4 columns where the PK is made up of all 4 columns. One of the columns (IsDefault) is a bit field in the database. If I insert a record with IsDefault set to true everything works fine. If I [...] read more
c#
sql-server
entity-framework
.net-core
entity-framework-core
5votes
1answer

FsXaml.Wpf.TypeProvider cannot be loaded

I'm trying to use WPF with F#. I've created a project using the F# Empty Windows App template (in fact, I've created several using different settings). Then I added the FSharp.ViewModule and FsXaml.Wpf references. It works fine when the project only had MainWindow.xaml and MainWindow.xaml.fs. But as soon as I [...] read more
wpf
mvvm
f#
fsxaml
fsharp.viewmodule
5votes
2answers

Windows UI (UWP or 8.1) in F# interactive

By referencing the default WPF DLLs, it's pretty easy to do anything you could do using code-only WPF: #r "PresentationCore.dll" #r "PresentationFramework.dll" // ...other DLLs... #r "WindowsBase.dll" let window = System.Windows.Window() let panel = System.Windows.Controls.StackPanel() let button = System.Windows.Controls.Button() panel.Children.Add button button.Content <- "hi" window.Content <- panel window.Show() ... and [...] read more
f#
uwp
uwp-xaml
f#-interactive
4votes
4answers

Importing NTFSSecurity module from UNC path fails

I've created a central repository for Powershell modules, but I'm having trouble loading one in particular. The NTFSSecurity module is failing to import with the following message. PS Z:\> Import-Module NTFSSecurity Add-Type : Could not load file or assembly 'file://\\fs\PowerShellModules\NTFSSecurity\Security2.dll' or one of its dependencies. Operation is not supported. (Exception [...] read more
powershell
.net-4.0
4votes
1answer

How can a JSON_VALUE be converted to a DateTime with EF Core 2.2?

I am mapping JSON_VALUE using the technique from How to write DbFunction's translation. Since not all values in the JSON are strings, conversion is sometimes necessary. When converting to int, everything is fine: var results = context.Set<SampleTable>() .Where(t1 => Convert.ToInt32( JsonExtensions.JsonValue(t1.SampleJson, "$.samplePath.sampleInt")) > 1); .ToList(); The resulting SQL is: SELECT [...] read more
c#
json
sql-server
entity-framework-core
ef-core-2.2
4votes
2answers

LINQ TO ENTITY cannot compare to enumeration types

Below are the enum Leaves public enum Leaves { Annual = 0, Medical = 1, Hospitalization = 2, Unpaid = 3 } Below is the linq query public ActionResult ApproveLeave(int? id) { if (id == null) return View(); LeaveApplication leaveApplication = db.LeaveApplication.Find(id); if (leaveApplication == null) return HttpNotFound(); leaveApplication.Status = [...] read more
c#
asp.net-mvc
entity-framework
enums
linq-to-entities
4votes
4answers

VS2010 Assembly Load Error

I am getting the following error when I try to build an ASP.NET 4 project in Visual Studio 2010: "Could not load file or assembly 'file:///C:\Dev\project\trunk\bin\Elmah.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)". I have verified that the dll does, in fact, exist, and [...] read more
asp.net
visual-studio-2010
3votes
1answer

Exception in serialization of System.Data.DataTable using the new "System.Text.Json" class (Asp.net core 3.0 preview 8)

I am writing a rest api in asp.net core 3.0 preview 8 and I was trying to serialize a System.Data.DataTable using the new "System.Text.Json" class, but in the Serialize method I receive the exception: > The collection type 'System.Data.DataRelationCollection' on > 'System.Data.DataTable.ChildRelations' is not supported. The same serialization works well [...] read more
asp.net
json
system.text.json
3votes
1answer

How to dynamically load an assembly from custom directory including its dependencies?

I found the following code that loads a dll dynamically from a custom location: private void Form1_Load(object sender, EventArgs e) { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.AssemblyResolve += new ResolveEventHandler(MyResolveEventHandler); } private Assembly MyResolveEventHandler(object sender, ResolveEventArgs args) { string folderPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string assemblyPath = Path.Combine(folderPath, "libs", new AssemblyName(args.Name).Name + ".dll"); [...] read more
c#
.net
.net-assembly
assembly-resolution
resolve
3votes
1answer

ReSharper inspectcode.exe 2016.3 throws exceptions

I have downloaded ReSharper's inspectcode.exe version 2016.3, but even "inspectcode.exe --help" doesn't run smoothly and displays many errors. First it prints "running...", then five exceptions, and at the end help text. What can be the solution for this? With version 9.1.1 there isn't any problem. OUTPUT OF INSPECTCODE.EXE --HELP PS [...] read more
c#
.net
command-line
resharper
3votes
2answers

f# SqlDataProvider .Net Core 2.0 - enlisting in ambient is not supported

By day I'm a C# programmer, but an F# enthusiast. whist doing some tutorial (suave) I stumbled upon this error System.NotSupportedException HResult=0x80131515 Message=Enlisting in Ambient transactions is not supported. Source=System.Data.SqlClient StackTrace: at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at FSharp.Data.Sql.Providers.MSSqlServerProvider.FSharp-Data-Sql-Common-ISqlProvider-ProcessUpdates(IDbConnection con, ConcurrentDictionary`2 entities, TransactionOptions transactionOptions, FSharpOption`1 timeout) at <StartupCode$FSharp-Data-SqlProvider>.$SqlRuntime.DataContext.f@1-52(SqlDataContext __, IDbConnection con, [...] read more
f#
.net-core
type-providers
csqldataprovider
3votes
1answer

Permissions to load assembly at runtime in ASP.NET MVC

I'm currently working on a function for my website that should work like this: * User upload an dll * I load the dll inside another app domain (with Assembly.LoadFrom) to inspect it with reflection * Unload the app domain and delete the .dll file This works perfectly fine when [...] read more
c#
asp.net
.net
asp.net-mvc
.net-assembly
2votes
1answer

Windows 10 Pro lockscreen mass change

I'm search way to change lockscreen image on Windows 10 Pro amd64 workstations in domain. I found than group policy option work only on Enterprise version at least in 1607 and 1703 releases. Registry changes takes no effect. Changes from PowerShell not posible bacause of SetImageFileAsync method requires async file [...] read more
windows-10
powershell
group-policy
2votes
1answer

Error loading dll from an executable on Windows Server 2008

I received an executable which uses .NET to load a dll and perform some database migration tasks. When I tried to run it, I was greeted with the following error: !!! System.IO.FileLoadException: Could not load file or assembly 'file:///C:\PATH\REDACTED.dll' or one of its dependencies. Operation is not supported. (Exception from [...] read more
windows
.net
dll
2votes
1answer

In Mongo C#, when grouping, how do you create a list of your groups with their entire contents?

I am using Mongo C# v 2.11.5 to group users by their CategoryId. I would like the variable list_of_groups to contain a list of groups, where each group has a list of all the documents in the group, where each document contains all its individual properties. I don't want to [...] read more
c#
mongodb
mongodb-query
aggregation-framework
2votes
1answer

How to map SQL_VARIANT in Entity Framework 6?

I'm using Entity framework 6 database first. There was already designed database and I need to use it to create an API. In severl tables [sql_variant] was used as a column type. When I added entity framework, all [sql_variant] columns were ignored with warning informing me that there is no [...] read more
c#
sql-server
entity-framework
entity-framework-6
2votes
0answers

How to use DateTimeOffset in a C# linq query to the database

I am using entity framework and AutoMapper in my project. In the database DatreTime fields were initially created as a string type fields and stays the same (example the fields 'DepartureTime' and 'ArrivalTime'). I am trying to make a DateTime comparison in my solution in a linq query to the [...] read more
c#
linq
datetime
linq-to-sql
datetimeoffset
2votes
0answers

How to Edit Bookmarks in a Word Document using Universal Windows App

I am building a Universal Windows application(UWP) which need to the add text to the bookmarks in a Microsoft Word Document. I added the library Microsoft.Office.Interop.Word and included the below code that can add text to the bookmarks: Microsoft.Office.Interop.Word.Application oWord = new Microsoft.Office.Interop.Word.Application(); Microsoft.Office.Interop.Word.Document oDoc; object oTemplate = filepath; oDoc [...] read more
uwp
.net-core
ms-word
office-interop
windows-10-universal
2votes
2answers

Enable-Migrations Not Working Because of the Windows on Mac

I am a Mac user but want to develop with C# via Visual Studio. Therefore, I have a Parallels account which is a programme for switching OS to the Windows while using it. Firstly, let me introduce the error I am getting: (Trying to do it from the Package Manager [...] read more
c#
entity-framework
nuget-package
migrate
2votes
2answers

Fusion logs show no error after "Could not load file or assembly"

I have a Windows service app that installs beautfully on my localhost (Win8 64bit) and my test VM (WinServer2016). And we have installed it on various other OS's including Win 7 64bit. But when I try to install in a client's desktop (also a Win7 64bit) it fails with this [...] read more
c#
.net
windows
windows-services
fusion
2votes
0answers

"Could not load file or assembly Operation is not supported." On Mapped Network Drive

I have tried solutions from the following posts/sites: * Could not load file or assembly Operation is not supported. (Exception from HRESULT: 0x80131515) * Could not load file or assembly in VS2017 with IIS express * Visual Studio "Could not load file or assembly. Operation is not supported" error in [...] read more
c#
windows
visual-studio
unit-testing
network-drive
2votes
2answers

Problems loading iTextSharp in PowerShell

I am having problem loading the iTextSharp.dll in PowerShell. Sometimes it works fine using either: [System.Reflection.Assembly]::LoadFrom("C:\dll\itextsharp.dll") Add-Type -Path C:\dll\itextsharp.dll' However, most times I get the following error: Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:/// C:\dll\itextsharp.dll' or one of its dependencies. Operation is not supported. [...] read more
powershell
itextsharp
2votes
0answers

Moq: Veriy if SendAsync of a Targetblock object was called

I've a class that is initialised with a reference to a ITargetBlock<T> object. In my unit tests I wanted to check if the SendAsync<T> method of ITargetBlock<T> was called. So I used the following verification code: this.targetFake.Verify(mock => mock.SendAsync(It.IsAny<InternalMessage>()), Times.Never()); When calling this code I get the following exception: > [...] read more
c#
moq
dataflow
2votes
2answers

Self hosting SignalR in console app, throws Could not load file or assembly 'Microsoft.AspNet.SignalR.Core.... when deployed

I'm self hosting SignalR in a console app. The code works fine if visual studio is installed on the machine. However, when I build and send to a machine without visual studio, the code fails when it tries to start signalR, giving the following error. > Could not load file [...] read more
c#
asp.net
.net
signalr
visual-studio-2017
2votes
0answers

Error occurs just in normal prompt, not ISE

I was confronted with the following error: Add-Type : Die Datei oder Assembly "file://\\myuncpath\my.dll" oder eine Abhängigkeit davon wurde nicht gefunden. Der Vorgang wird nicht unterstützt. (Ausnahme von HRESULT: 0x80131515) In Zeile:1 Zeichen:1 + Add-Type -Path "\\myuncpath\my.dll" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Add-Type], FileLoadException + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand [...] read more
powershell
assemblies
dllimport
2votes
2answers

Cannot load dll assembly in windows 10 (Exception from HRESULT: 0x80131515)

I was trying to load the compiled dll assembly of JSON.NET. However I get the following error message: PS C:\Users\tamas\Desktop\garbage> Add-Type -path .\Newtonsoft.Json.dll Add-Type : Could not load file or assembly 'file:///C:\Users\tamas\Desktop\garbage\Newtonsoft.Json.dll' or one of its d ependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) At line:1 char:1 + [...] read more
powershell
dll
scripting
2votes
1answer

How to load .NET DLL remotely within new AppDomain

I tied to create simple program Console App C# .NET 4.0 to load DLL file remotely. My code works as expected on load dll that on the local computer but I got problem resolve dll when trying to load remotely. I have no idea to handle this since I can't [...] read more
c#
dll
appdomain
.net-remoting
2votes
1answer

The "GenerateResource" task failed unexpetedly Error in a Windows Universal project

I'm getting the following error when building my app. Any idea what's causing it or how to fix it? Error The "GenerateResource" task failed unexpectedly. System.IO.FileLoadException: Could not load file or assembly 'file:///C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Tasks.Core\v4.0_14.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Tasks.Core.dll' or one of its dependencies.Operation is not supported. (Exception from HRESULT: 0x80131515) File name: 'file:///C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Tasks.Core\v4.0_14.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Tasks.Core.dll' ---> System.NotSupportedException: [...] read more
.net
visual-studio-2013
win-universal-app
2votes
2answers

NServiceBus Publish/Subscribe Example -- Couldnt load assembly NServiceBus.Core or its dependency

I am new to NServiceBus. I have download the latest build from NSERvice bus website. When i run the PUBLISH Subscribe sample, i get the following error. I have no idea whats going wrong. All assemblies are there. May be it is with in the framework. Can anyone shed some [...] read more
visual-studio-2010
.net-4.0
nservicebus
2votes
2answers

Visual Studio freezes after compiling. So does Explorer when I try to launch the application

My simple code: #include <stdio.h> int main() { printf("Hi"); return 0; } After being successfully built by Visual Studio, it hangs when it tries to launch the .exe of the newly built program. What I get is a "Generating code... code generated successfully" here it displays the path for example [...] read more
c
visual-studio
1vote
1answer

Why can't PowerShell load file or assembly to run Azure PowerShell Module?

I can't get PowerShell to run connect-azaccount. When I invoke it (using connect-azaccount -subscriptionid #######...) I get: connect-azaccount : The 'connect-azaccount' command was found in the module 'Az.Accounts', but the module could not be loaded. For more information, run 'Import-Module Az.Accounts'. At line:1 char:1 + connect-azaccount -subscriptionid ######### ... + [...] read more
azure
powershell
azure-powershell
1vote
1answer

Receiving System.NotSupportedException when trying to make a string ProperCase (VB)

Private Sub btnNewStudent_Click(sender As Object, e As EventArgs) Handles btnNewStudent.Click Dim name As String = InputBox("Enter the Student's Name", "Name", "Student Name") name = StrConv(name, vbProperCase) addStudent(name) If name = "" Then errorMessage("Please Enter a Name") lstStudents.Items.Remove("") End If End Sub Error Description: > "System.NotSupportedException: No data is available for [...] read more
vba
vb.net
1vote
1answer

FreeTextBox can't load dependency but it works

I am having a bizarre problem. I installed FreeTextBox for my ASP.NET project (WebForms) and I set it all up and its working perfectly, it does what needs to be done. In the solution though, after a few compiles, I get the following error: Error 1 'Could not load file [...] read more
asp.net
freetextbox
1vote
0answers

Python Shared Network, loadFromRemoteSources

I build my python code with pyarmor + nuitka so i get exe. Sharing this exe with shared network. But When exe tries to load dll (import clr) it gets Unhandled Exception: System.IO.FileLoadException: Failed to load the file 'file: // \\ 192.168.1.251 \ MyFolder\ GameMenu \ Python.Runtime.dll' or its integrated [...] read more
python
networking
clr
python.net
1vote
0answers

loadFromRemoteSources exception with enable migration in ASP.NET MVC

I have problem when trying to enable migrations in ASP.NET MVC. When I run the command Enable-Migrations in the Package Manager Console, I get this exception : > System.Reflection.TargetInvocationException: Exception has been thrown by the > target of an invocation. ---> System.IO.FileLoadException: Could not load file > or assembly 'DataLayer, [...] read more
c#
asp.net
asp.net-mvc
entity-framework
migration
1vote
1answer

Workaround for Protobuf-NET IExtensible Inheritance Not Supported

I am deserializing protocol buffer data using Protobuf-NET and am dealing with multiple Proto files that are identical but have slightly different extensions. Basically each Proto feed is 99% identical and then has 1 or 2 fields different from each other provided as extensions for each. So I ended up [...] read more
c#
inheritance
protocol-buffers
protobuf-net
1vote
1answer

Can not retrieve data from DB -> ERROR - >The entity or complex type ... cannot be constructed in a LINQ to Entities query

I have checked majority of several question but unfortunately, due to lack of enought experience, will not be able to solve this problem without your help. I can not understand why this error happens. I think code is not wrong. To see whole code in github This is > UserController [...] read more
c#
asp.net-mvc
ef-code-first
visual-studio-debugging
1vote
2answers

the given path format is not supported; streamwriter

Below are the Stacktrace; System.NotSupportedException HResult=0x80131515 Message=The given path's format is not supported. Source=mscorlib StackTrace: at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, [...] read more
c#
1vote
0answers

Why can't powershell 6 aka pwsh.exe load System.Windows.Forms

I have two different versions of powershell on my machine. * powershell.exe 5.1.18362.145 * pwsh.exe 6.2.3 With powershell.exe I can execute [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") $oReturn=[System.Windows.Forms.Messagebox]::Show("This is the Message text") But with pwsh.exe I get the error Exception calling "LoadWithPartialName" with "1" argument(s): "Could not load file or assembly 'System.Windows.Forms, Culture=neutral, PublicKeyToken=null'. Operation [...] read more
.net
winforms
powershell
1vote
1answer

Mocking a Collection ClusterState

I am trying to mock the cluster state of a mongo collection so it gives back a ClusterState.Connected. Below you will see one of my unit tests. Currently this is giving back an error, is there any way to Mock the Collection.Database.Client.Cluster.Description.State? [Fact] public void HealthCheck_SucceededDatabase_Connection() { //Arrange var myRepository [...] read more
c#
mongodb
unit-testing
moq
1vote
1answer

NotSupportedException when calling WCF service (Crypto algorithm not supported in this context)

I am trying to use a WCF with federation. Therefore my client obtains a token from the STS, opens the channel with the issued token and finally calls the service. Then, I am getting the following exception: System.NotSupportedException HResult=0x80131515 Message=Crypto algorithm not supported in this context. Source=mscorlib StackTrace: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage [...] read more
.net
wcf
wif
1vote
1answer

Import Powershell Module (powershellaccesscontrol) from UNC

Im trying to use this powershell module to get the ACL for a wmi object in a way that can be interpreted. (Security Descriptor isnt rly helpful at understanding the permissions of a user) I want to use this in a script thats used on multiple servers. I dont want [...] read more
powershell
module
import-module
1vote
1answer

WPF Entity Framework with multiple databases

I am developing a WPF application which uses different databases. The database is selected from a combobox on every form and fills the data grid with the data. The problem I have is this: one of the databases has a table Projects, the rest of the databases don't have this [...] read more
c#
wpf
entity-framework
linq
1vote
0answers

CA0053 unable to load rule assembly rules.dll VS 2017

How to resolve this error > CA0053 CA0053 : Unable to load rule assembly 'c:\program files (x86)\microsoft > visual studio\2017\enterprise\team tools\static analysis > tools\fxcop\rules\rules.dll': Could not load file or assembly > 'file:///c:\program files (x86)\microsoft visual studio\2017\enterprise\team > tools\static analysis tools\fxcop\rules\rules.dll' or one of its dependencies. > Operation is not supported. [...] read more
code-analysis
rules
.net-framework-version
visual-studio-2017
1vote
0answers

Error when accessing DLL on specific server

I am trying to read the Version from a DLL using Powershell using this code: Add-Type -Path "\\myuncpath\my.dll" $version = [MyProd.MyVersion]::CurrentProductVersion + '.' + [MyProd.MyVersion]::CurrentBuild It works on all of my server except one. On this one I am getting the following error: Add-Type : Die Datei oder Assembly "file://\\myuncpath\my.dll" [...] read more
powershell
1vote
1answer

EF Identity in WebAPI 2 stops working when model changed

I want to build a website in Angular with a web service that Android/iOS can use. I finally found a great tutorial that helped me set that up. The next step, is to extend the Identity Model. So, I added a property. Then I started to get an exception: "The [...] read more
c#
angularjs
entity-framework
asp.net-web-api
identity
1vote
2answers

Installing EntityFramework 6.1.3

I am getting the following error when installing Entity Framework with Visual Studio 2015 Community Edition: > install-package EntityFramework Attempting to gather dependency information > for package 'EntityFramework.6.1.3' with respect to project 'Vidly', targeting > '.NETFramework,Version=v4.5.2' Attempting to resolve dependencies for package > 'EntityFramework.6.1.3' with DependencyBehavior 'Lowest' Resolving actions to [...] read more
c#
entity-framework
visual-studio-2015
1vote
2answers

Why am I having an error trying to locally install cs-script?

* You download CS-Script package from the site * The installation instructions say to unzip the file where you want and then run css_config.exe to install the package. * But if you run a later version of .NET, you'll likely see a message box that says this: System.IO.FileLoadException: Could not [...] read more
.net
windows
code-access-security
cs-script
1vote
1answer

NServiceBus Could not load file or assembly

I am getting the below error when i call "NServiceBus.Host.exe". The issue appears to be itextsharp.dll. I've read that i can use "Configure.With(AllAssemblies.Except("itextsharp.dll"))... // rest of your config" But i'm using the following sample and not sure where to add this property. http://docs.particular.net/samples/web/asp-mvc-application/ # Unhandled Exception: Magnum.StateMachine.StateMachineException: Exception occurr ed [...] read more
nservicebus
0votes
0answers

Cant import a module due to "Import-Module : Could not load file or assembly" however the file is present

Cant import the module due to the error below, but that file is present. C:\Users\User.Name> Import-Module AWS.Tools.S3 Import-Module : Could not load file or assembly 'file:///C:\Users\User.Name\Documents\WindowsPowerShell\Modules\AWS.Tools.Common\4.1.12.0\AWSSDK.Core.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) At line:1 char:1 + Import-Module AWS.Tools.S3 + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : [...] read more
powershell
powershell-module
aws-powershell
0votes
0answers

C# marshal struct with complex array to bytes

I have to interop with a device, through a C++ interface that accepts byte[] for both in/out streams. Many of the data being passed around are in the form of an outer struct containing some numbers, and a dynamic array of inner structs (which in turn may contain arrays of [...] read more
c#
marshalling
0votes
1answer

PowerShell Import-Module SqlServer Could not load PSSnapins.dll

Trying to Import SQL Server module to use Invoke-Sqlcmd and whether in raw PowerShell ISE (as Administrator and non-Admin) or via SSMS I get the same error and wondering if someone could help please? The version I am using is an unzipped nupkg of sqlserver.21.1.18230 (the latest release) and the [...] read more
sql-server
powershell
0votes
0answers

ASP.NET MVC enable-migrations fails every time

I am using Visual Studio 2019 Community edition trying to complete a university assignment which requires me to enable migrations. However, I have tried everything short of buying myself a whole new computer. I searched the internet for answers such as the <configuration> <runtime> <loadFromRemoteSources enabled="true"/> </runtime> </configuration> Answer or [...] read more
c#
asp.net
asp.net-mvc
entity-framework
0votes
0answers

Unable to access MySql.Data.ddl in powershell Lambda, cannot add dependencies to powershell lambda deployment

I have been having issues adding a MySql.Data.dll to the deployment package of my powershell lambda functions. I have manually copied the dll to the AWSPowershell.NetCore directory and it appears in the modules folder of the deployed lambda function. However, I cannot find a way to get the dll into [...] read more
powershell
aws-lambda
0votes
2answers

Why am I receiving this when trying to create a new UE4 C++ project ? (only C++ projects)

I receive an IO Exception for a project file that does not exist (I just tried to create that project) I tried Visual Studio 2017 instead of 2019 (for compatibility problems with UE 4.22.3) and I couldn't find anything wrong with my windows SDKs (some people on Unreal Engine forums [...] read more
unreal-engine4
0votes
1answer

Not able to load .net DLL targeted for 64-bit platform only

Below is the exception being thrown: com.javonet.api.NException: Could not load file or assembly 'file:///C:\downloads\UrlNomalization\Microsoft.Bing.HashUtil.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) at System.Reflection.RuntimeAssembly._nLoad(Unknown Source) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(Unknown Source) at System.Reflection.RuntimeAssembly.InternalLoadFrom(Unknown Source) at System.Reflection.Assembly.LoadFrom(Unknown Source) at SicsClrController.Engine.ClrEngine.LoadAssembly(Unknown Source) at SicsClrController.Engine.ClrEngine.processCommand(Unknown Source) at com.javonet.internal.BinaryStreamProtocol.executeCommand(Unknown Source) at com.javonet.internal.GatewayManager.loadAssembly(Unknown [...] read more
javonet
0votes
0answers

Windows PowerShell Module Not Loading - Operation not supported 0x80131515

I want to use the PSWindowsUpdate module latest version on multiple servers. So I downloaded it via PowerShell "install-module" and then copied the folder to a UNC share. Now when I try to import it, it usually provides this message: > ipmo : Could not load file or assembly > [...] read more
powershell
dll
updates
0votes
0answers

MsBuild failure when compiling test suite after checking out from Git repo

I have a test suite created in my local machine which builds without any issues using command prompt via msbuild. But when I try to compile the same after checking out from git repo, I get the following error. I tried opening the code from visual studio and building, I [...] read more
c#
msbuild
0votes
3answers

Access Sitecore context in Unit test project

I would like to access sitecore context in MS Test Project. I am using Sitecore 8.1 and the MS test project (Framework: 4.5.2) using VS 2005 I followed some of the instructions found here http://getfishtank.ca/blog/unit-testing-in-sitecore-with-context-and-app-config So I have all the required DLLS and sitecore config files in my unit test [...] read more
c#
unit-testing
sitecore
sitecore8
0votes
2answers

Revit plugin DLLs downloaded from my GitHub don´t work. The ones compiled in my machine load fine

Sorry for the long title, I´ll try to be brief. I have developed a collection of IExternalCommands for Revit 2020 using C# and Visual Studio. Also an IExternalApplication for a ribbon to contain them. They work like charm in my computer. I am using GitHub to store the project and [...] read more
c#
visual-studio
github
revit-api
revit
0votes
0answers

C# WPF App - Exception on closing application

I have a problem with exception appearing while closing my WPF application. HResult=0x80131515 Message=The Read method cannot be called when another read operation is pending. Source=System StackTrace: at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count) at MySql.Data.MySqlClient.TimedStream.Read(Byte[] buffer, Int32 offset, Int32 count) [...] read more
c#
wpf
mysql.data
0votes
2answers

Costura Fody throwing error with FodyIsolated.dll

I've built a WPF application, and used Costura.Fody to combine it into one exe. This has worked until today, and the only change that I know of is that I upgraded Visual Studio (Community edition to 15.7.2). It now throws an error when building, immediately after starting: Could not load [...] read more
c#
wpf
fody-costura
0votes
1answer

appload DLL into bricscad works on some PC's but not all, how to debug?

I'm building the C# sample project provided with Bricscad V19 located at Bricsys\BricsCAD V19 en_US\API\dotNet\CsBrxMgd in visual studio 2019. The build is successful & runs correctly when loaded into my Bricscad V17 & V19, however when i send this to my colleagues we have varying results. Error Message: Could not [...] read more
c#
.net
visual-studio
visual-studio-2019
bricscad
0votes
0answers

Sybase: System.NotSupportedException: 'Unsupported data type 32 (column: )'?

I use the following library to access a Sybase IQ database. https://github.com/DataAction/AdoNetCore.AseClient However, it got the following error. It seems the char type causes the error. using var conn1 = new AseConnection(connString); using var cmd1 = new AseCommand(sql, conn1) { CommandTimeout = 300 }; conn1.Open(); var reader1 = cmd1.ExecuteReader(); // [...] read more
c#
.net
.net-core
ado.net
sybase
0votes
1answer

why is the try catch block not working correctly with errors

I am trying to capture errors in a meaningful way, as thats my habit, and when it comes to this block of code, i am not getting the result/output im hoping for: Unblock-File $dll1 -Verbose 4>&1 Add-Type -Path $dll1 Add-Type -Path $dll2 I get this output: > ERROR! Could not [...] read more
powershell
0votes
0answers

The member ScreenShot of type System.Drawing.Bitmap cannot be used as a parameter value

I have pretty much exhausted all of my knowledge up to this point, I keep getting an error on VS 2019: (System.NotSupportedException HResult=0x80131515 Message=The member ScreenShot of type System.Drawing.Bitmap cannot be used as a parameter value Source=Dapper) I am attempting to save a screenshot to a SQL database, I have [...] read more
c#
ssms
0votes
3answers

Enable Migrations Error

When trying to use Code First Migrations, the following error is occurring. Any ideas? PM> enable-migrations Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\Users\User1\Documents\Visual Studio 2013\ WebSites\Website1\C#\packages\EntityFramework.6.1.1\tools\Entity Framework.PowerShell.Utility.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)" At C:\Users\User1\Documents\Visual Studio 2013\WebSites\Website1\C#\ [...] read more
asp.net
0votes
2answers

Including UWP project in WPF project raises runtime errors

Project I work on need to show UWP control from UWP library inside of WPF window. Here is the document page on which I had based my work (check section for adding custom UWP control): https://docs.microsoft.com/en-us/windows/communitytoolkit/controls/wpf-winforms/windowsxamlhost#add-a-custom-uwp-control Had setup WPF window and it shows standard UWP controls (like button) at the [...] read more
wpf
xaml
uwp
shared-libraries
0votes
1answer

Unable to load custom visualizer of LLBL Gen Pro in VS19

I am using Visual Studio 2019. To C:\Users...\Documents\Visual Studio 2019\Visualizers I have added the following dll files to enable a visualizer for predicate buckets by LLBL Gen Pro. This approach works for VS 2017. The dll files: SD.LLBLGen.Pro.DebugVisualizers2017.dll, SD.LLBLGen.Pro.DQE.SqlServer.dll, SD.LLBLGen.Pro.ORMSupportClasses.dll When trying to use it in VS19, I get the [...] read more
c#
visual-studio
llblgenpro
llblgen
0votes
0answers

Could not load file or assembly in Release mode

I have a asp.net project in vs 2012. before adding a web reference every thing is OK. but when I add web reference again every things is OK in Debug mode. but in Release mode I have this error. Could not load file or assembly 'x.dll' or one of its [...] read more
asp.net
visual-studio
web-reference
0votes
1answer

DLL error at Publishing nopcommerce 3.80 fresh code

I've download nopCommerce 3.80 fresh code from github and publishing it from Visual Studio 2017 framework and I'm getting DLL related error. Here are error messages. ------ Build started: Project: Nop.Services, Configuration: Release Any CPU SGEN : error : Could not load file or assembly ..\nopCommerce_3.80_Source\packages\EPPlus.4.1.0\lib\net40\EPPlus.dll' or one of its [...] read more
publish
nopcommerce-3.80
0votes
1answer

Telerik doesn't work after moving project to another env

i moved my project from one env, and from then on i have issue running my application. The error i receive below. 'Could not load file or assembly 'Telerik.Web.UI, Version=2016.2.504.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)' read more
asp.net
telerik
0votes
2answers

Asp.Net boilerplate,, How to Move boilerplate project to another Computer?

I was working on ASP.Net boilerplate framework and now that machine is not available where i was working, But i have backup on my Google drive. How i can use that backup properly? Database creation , project running etc??? I am getting error on Enable-Migrations and Update Database Commands Exception [...] read more
c#
asp.net
ef-code-first
aspnetboilerplate
asp.net-boilerplate
0votes
2answers

Powershell fails to find its dll or dependency in VS 2013 Package Manager Console

I'm using VS Express 2013 .Net 4.5. I'm designing in MVC5 and EF6 with MS SQLServer LocalDB in an Oracle VirtualBox Windows 7 64bit client. I am trying to apply SQL Server LocalDb migrations with the command: > PM> Enable-Migrations -ContextTypeName SGHWA_MVC.Models.Context This always fails. My limited web knowledge is [...] read more
c#
.net
entity-framework
powershell
visual-studio-2013
0votes
2answers

Could not load file or assembly 'LogicNP.ShellObjects'

I need some help with a VB.net code. I am very new to VB.net. I am getting this error: > Error 'Could not load file or assembly 'LogicNP.ShellObjects, > Version=13.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75' or one of > its dependencies. Operation is not supported. (Exception from HRESULT: > 0x80131515)' This prevents me [...] read more
.net
vb.net
visual-studio
exception
.net-assembly
0votes
1answer

get data from database using Json for search method

i have a issue , my problem is it i can't use my object form my model using EF , i need this method for a autocomplete search; this is my error message : "The System.NotSupportedException exception occurred HResult = 0x80131515 Message = The entity type or complex type 'PizzaTn.Context.ViewModels' [...] read more
c#
jquery
.net
linq-to-entities
asp.net-mvc-5
0votes
2answers

Enable-Migrations Command giving Error

I was working on ASP.Net boilerplate framework and now that machine is not available where i was working, But i have backup on my Google drive. How i can use that backup properly? Database creation , project running etc??? I am getting error on Enable-Migrations and Update Database Commands Exception [...] read more
c#
entity-framework
entity-framework-migrations
aspnetboilerplate
asp.net-boilerplate
0votes
1answer

WIX Setup doesn't build

I am using the WIX binaries from a local folder instead of the common installation. So i had to overwrite my Paths like this: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <WixToolPath>$(TeamProjectBuildUtilsDir)Tools\WIX\</WixToolPath> <WixTargetsPath>$(WixToolPath)Wix.targets</WixTargetsPath> <WixTasksPath>$(WixToolPath)WixTasks.dll</WixTasksPath> </PropertyGroup> </Project> It was working ok, but today i tried it again and get this: System.IO.FileLoadException" in WixTasks.dll: > Additional [...] read more
wpf
deployment
wix
0votes
0answers

HRESULT: 0x80131515 on Release

We use a third party Dll, called EASendMail40.dll, the thing is that when I build the solution on debug mode everything goes perfect, but when release mode it throws 2 errors Hresult: 0x80131515 for two of the projects. I've being looking for an answer and anything works. Things I've already [...] read more
c#
dll
hresult
0votes
1answer

Visual Studio not finding unit tests

I've created a new project containing only a basic unit test. But no matter what I do, VS simply doesn't run the test. I presume it doesn't find it. namespace UnitTestProject1 { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { Debug.WriteLine("qwerty"); Assert.AreEqual(1, 2); throw new Exception("Kaboom!"); } } [...] read more
c#
visual-studio
unit-testing
vs-unit-testing-framework
0votes
2answers

Could not load file

enter image description hereI am executing the application the error occurred although the reference is already there,what could be the solution? > 'Could not load file or assembly 'NationalInstruments.UI.WindowsForms, > Version=13.0.40.242, Culture=neutral, PublicKeyToken=dc6ad606294fc298' or one > of its dependencies. Operation is not supported. (Exception from HRESULT: > 0x80131515)' Version Information: [...] read more
c#
asp.net
0votes
0answers

resharper inspectcode fails to run

I have recently started using ReSharper (it is installed and is working correctly in VS2012) and i'm looking at the CLI tools for use with some automated testing. I have downloaded, extracted and tried to run 'InspectCode.exe' but it is throwing a colossal error message: --- EXCEPTION #1/6 [NotSupportedException] Message [...] read more
windows
resharper
command-line-interface
0votes
1answer

Analytics Conversion Tool exception with WFFM

I have just upgraded a project in Sitecore 7.2 IR to Sitecore 7.5 IR. I have also WFFM module, which I am trying for some time to upgrade from version: 2.4 rev. 141008 into version: 2.5 rev. 141014. The first step would be to run the conversion tool. I did [...] read more
sitecore
0votes
0answers

Add-Type : Could not load file or assembly on powershell 3

I have an dll(assembly) file on the network share and want to import into powershell. I try as follow: PS C:\Windows\system32> Add-Type -Path \\path\Netlogon\Industry\Startup\Startup.dll and got Add-Type : Could not load file or assembly 'file://\\path\Netlogon\Industry\Startup\Startup.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) In Zeile:1 [...] read more
powershell
0votes
1answer

WixUIExtension.dll could not load from the network path while creating MSI package using WIX

I am using WIX (Windows Installer XML 3.7) to create an MSI package. This is in my *.WIXPROJ file <ItemGroup> <WixExtension Include="WixUIExtension"> <HintPath>$(WixToolPath)WixUIExtension.dll</HintPath> <Name>WixUIExtension</Name> </WixExtension> </ItemGroup> Also, <PropertyGroup> <ApplicationPath>\\BuildFolder</ApplicationPath> <WixToolPath>$(ApplicationPath)\BuildMSI\wix37-binaries\</WixToolPath> </PropertyGroup> When creating MSI file from network path following error is occurred. > The extension '\BuildFolder\wix37-binaries\WixUIExtension.dll' could not be > [...] read more
c#-4.0
wix
windows-installer
0votes
1answer

MSTest fails to load dll from network share

I am running MSTest (on a Microsoft Azure VM) to test a DLL which is in a network file share (linked to Azure File Storage). I get this error - > Could not load file or assembly 'file:///P:\test\bin\mydll.dll' or one of its > dependencies. Operation is not supported. (Exception from [...] read more
azure
azure-storage
mstest
network-share
fileshare
0votes
0answers

Registering .net 4 dll on Clients Machines

I have some programs that some of them built with vb6 and others are .net and all of them runs in many client machines, vb6 programs uses some of the dlls of .net programs and because of this, i always have to register these .net dlls on client machines. i [...] read more
.net-4.0
client
config
regasm
mapped-drive
0votes
1answer

VS: WMPLib.dll loading error

Sorry for ask this basic question. I am a newbie in VS ann C#. I have read many artcicles and books about VS and C#, but I have no practice. I downloaded a C# solution from github and I am trying build it with C# with Visual Studio 2015. When [...] read more
c#
visual-studio
-1votes
1answer

How to read a text file in Visual Studio 2019?

Edit: After someone pointed out I was trying to double my directory searching (is that the term to be used?), I corrected it and did a little bit of searching. For anyone else who may find this, here's my current code, which has given me the results I need: Private [...] read more
vb.net
-1votes
2answers

Strange behavior with function Copy.File on virtual VM

I wrote the following function, which copies file(s) to computers: public void CopyFile() { //data _pathcopy = txtb_to.Text; _computers = txtb_pc.Lines; _copyfiles = txtb_from.Text; string fileName = GetFileNameFromLabel(_copyfiles); string from = Path.Combine(_copyfiles); foreach (var comp in _computers) { string topath = GetUNCPath(_pathcopy, comp, fileName); Directory.CreateDirectory(GetUNCPath(_pathcopy, comp)); try { File.Copy(from, topath); [...] read more
c#

Comments

Leave a comment

(plain text only)

Sources

  1. https://github.com/dotnet/coreclr/blob/v1.1.0/src/inc/corerror.xml
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0