我目前正在开发一个小型控制台应用程序,它应该与Microsoft有某种程度的集成。我猜用户可能有不同版本的Microsoft,这就是为什么我决定在运行时加载互操作资产(但我不确定这是正确的决定)。
下一段代码抛出一个异常System.ArgumentNullException Value cannot be null. Arg_ParamName_Name。正如我所理解的,问题是WordInterop.GetType("Application")返回null,但是我不明白为什么。
class Program
{
static void Main(string[] arg
如果Dispose()方法声明不可见/声明,System.ServiceModel.ClientBase抽象类如何实现IDisposable接口?
如果我尝试做同样的事情,我会得到一个错误并且无法编译
abstract class ATeste : IDisposable
{
}
'ATeste‘不实现接口成员'System.IDisposable.Dispose()’
我使用VS 2010和Framework4.0。
检查ClientBase声明:
// Summary:
// Provides the base implementation used to
我正在尝试使用VB.Net禁用Exchange 2010中的邮箱。
Dim rsConfig As RunspaceConfiguration
rsConfig = RunspaceConfiguration.Create()
Dim snapInException As PSSnapInException = Nothing
Dim info As PSSnapInInfo = rsConfig.AddPSSnapIn("microsoft.exchange.management.powershell.e2010", snapInExcepti
我用VisualStudio2017 RC创建了一个解决方案,一切正常工作,但是我关闭了解决方案并在稍后重新打开它,我不能再加载Web应用程序项目了,我有错误:
项目发生错误。
值不能为空。
参数: key
该项目的目标是框架.NETCoreApp 1.1。
这是我在日志文件中发现的错误:
=====================
12/01/2017 13:16:45
Recoverable
System.AggregateException: Une ou plusieurs erreurs se sont produites. ---> System.Argum
我们不断得到这样的异常:
Application_Error: Unhandled exception has been occured while
requesting:/~/media/Flash Movies/nameoftheItem.ashx
System.ArgumentNullException: Value cannot be null.
Parameter name: ownerType while requesting a media item.
我们有很多媒体项目,它们都工作得很好。我们只针对两个特定的项目(其中一个是flash电影,另一个是图像)获得此异常。
我很
我试图创建一个新的迁移,但是我得到了一个System.ArgumentNullException,它说:
System.ArgumentNullException: Value cannot be null.
Parameter name: language
at Microsoft.EntityFrameworkCore.Utilities.Check.NotNull[T](T value,
String parameterName)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperati
我使用的是Microsoft.Azure.Webjobs (3.0.8),我得到了一个错误,编译时声明
listener for function 'Functions.ProcessCollateFiles' was unable to start.
Inner Exception 1:
ArgumentNullException: Value cannot be null.
Arg_ParamName_Name
我正在查看nuget文档中的示例,我不知道是什么导致了这个问题。
我的职责是
public void ProcessCollateFiles([TimerTrig
我正在运行一些使用通用主机配置(,)构建的NServiceBus端点。这些端点在Docker容器中运行。现在,我想安排一条消息(带着绞刑)。无论何时执行计划的消息,我都会得到以下错误:
Value cannot be null. (Parameter 'session')
System.ArgumentNullException: Value cannot be null. (Parameter 'session')
at NServiceBus.Guard.AgainstNull(String argumentName, Object value)
这是没有意义的,反思和例外让我相信这是没有任何问题的,但我得到了一个System.ArgumentNullException在下面的行,无论发生什么。
Guid testGuid = new Guid("745a17a0-74d3-11d0-b6fe-00a0c90f57da");
抛球;
System.ArgumentNullException occurred
HResult=-2147467261
Message=Value cannot be null.
Parameter name: g
ParamName=g
Source=mscorlib
St
如何在F#中序列化None?下面的代码引发System.ArgumentNullException: Object Graph cannot be null.错误:
let f = System.Runtime.Serialization.Formatters.Binary.BinaryFormatter()
let m = System.IO.MemoryStream()
f.Serialize (m, None)
我有这样的节点,当用户通过身份验证时,我想隐藏它。
我如何使用ASP.NET MVC SiteMap提供程序来做到这一点?
我试过了:
但是我得到了一个错误:
Value cannot be null.
Parameter name: type
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it
我正在运行hangfire后台进程。现在调用的函数的一部分是使用MediaService,它也需要HttpContext,因为当我尝试执行mediaService.Save(media)时,它抛出一个错误 System.ArgumentNullException
Value cannot be null. Parameter name: httpContext
System.ArgumentNullException: Value cannot be null.
Parameter name: httpContext 根据我所读到的,它需要是一个普通的http请
我在C#中使用字典,希望显示用户输入的键,如果字典中存在该键,则显示该键及其相应值。此外,继续阅读这些行,直到没有更多的输入。
using System;
using System.Collections.Generic;
using System.IO;
class Solution
{
static void Main(String[] args)
{
string number = Console.ReadLine();
int n;
Int32.TryParse(number, out n);
va
我试图通过使用C#从TFS查询工作项来生成/运行一些报告。
参考链接。这段代码几个月前运行良好,能够检索结果。
不知道为什么在第2行出现异常
var tfsUrl = ConfigurationManager.AppSettings.Get("TfsCollection");
var uri = new Uri(tfsUrl);
var projCollection = TfsTeamProjectCollectionFactory
.GetTeamProjectCollection(uri);
//var workIt
在Asp.net MVC中实现搜索时,我收到了System.ArgumentNullException: 'Value cannot be null.'错误。
public static Collection<Video> vList = VideoRepository.GetCollection();
List<Video> listofvideos = new List<Video>
public ActionResult Index(string item)
{
foreach (Video movie in vList)
{
当我单击内容部分的演示详细信息时,它打开了一个对话框,其中显示了所有现有的占位符。现在,单击弹出窗口中的任何一项,我都会得到一个错误:
Value cannot be null, Parameter name: Key Details:
System.ArgumentNullException: Value cannot be null.
我想返回所有没有名字的UserPrincipals。
使用此代码:
List<UserPrincipal> searchPrinciples = new List<UserPrincipal>();
searchPrinciples.Add(new UserPrincipal(ctx) { Name = null });
给我一个错误:
System.ArgumentNullException: Value cannot be null.
Parameter name: Principal.Name cannot be null or empty.
在使用此搜索参数时,
当我尝试用Xamarin Forms中的XAML创建一个内容视图时,生成的代码隐藏抛出了这个错误:
System.ArgumentNullException: Value cannot be null. Parameter name: clrNamespace
at this.LoadFromXaml(typeof(MyXamlPage));
at InitializeComponent()
XAML:
<ContentPage
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
我已经实现了一个MemoryCache,它通过CacheEntryRemovedCallback“自动刷新”内容。
但是,当从缓存中删除项时,我在阻止脏读取时遇到了问题。
我的缓存实际上是被请求破坏的,我需要确保在更新缓存条目时阻止它们读取。
我的密码在下面。如您所见,我尝试在更新缓存以及读取数据时使用简单的lock()。但是,读取是在从项移除并获得锁的时间内完成的。
public List<Domain.Turbine> IgnorableTurbines
{
get
{
var ignorableTurbines = new List<Do
这是.cs文件在Mono中运行良好:
using System;
public class HelloWorld
{
static public void Main ()
{
Console.WriteLine("Enter a number");
int UserNumber = int.Parse(Console.ReadLine());
Console.WriteLine("Your number is: " + UserNumber);
}
}
我用Xamarin打开了这个Test.cs文件,它工作正
我对控制台很陌生。我已经成功地安装了KVM,并试图在我的ASP.NET 5应用程序中创建一个迁移。
当我运行“get”时,会得到以下异常:
k.cmd : System.ArgumentNullException: Value cannot be null.
At line:1 char:2
+ k <<<< ef
+ CategoryInfo : NotSpecified: (System.Argument...cannot be null.:String) [], RemoteException
+ FullyQualifiedE
SQLite.ttinclude (用于VB)应具有
tbl.Schema="";
在LoadTables过程中,否则Struts.tt将不会编译
Running transformation: System.ArgumentNullException: Value cannot be null.
Parameter name: objectToConvert
at Microsoft.VisualStudio.TextTemplating.ToStringHelper.ToStringWithCulture(Object objectToConvert)
at
我正在为我的CRUD创建一个单元测试,并且在我的Delete测试方法中收到这样的错误:
System.ArgumentNullException: Value cannot be null.
我检查并发现,每当我运行测试时,我的userID下的内容已经被删除,但在我的测试结果栏中收到“失败”状态。有人能帮我解决我的问题吗?
Error Message: Test method TestProject1.UserTest.Delete threw exception:
System.ArgumentNullException: Value cannot be null.
Parameter n
Application: LMS2RecurringAssignmentApp.exe
CoreCLR Version: 6.0.21.52210
.NET Version: 6.0.0
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException: Value cannot be null. (Parameter 'connectionString')
在我们的本地环境中,通过将appsettings.jso
我在尝试运行.net 3.1应用程序时遇到异常。 public class Program
{
public static void Main(string[] args)
{
var host = CreateWebHostBuilder(args).Build(); --> Exception here! 以下是例外情况: System.ArgumentNullException: 'Value cannot be null. (Parameter 'configure')' 不确定问题出在哪里? using Micr