cuốn sách gpt4 ai đã làm

c# - Lỗi nội bộ: Mục đã được thêm vào từ điển: 'tmp' Khóa đang được thêm: 'tmp'

In lại Tác giả: Vũ trụ không gian Thời gian cập nhật: 2023-11-03 11:08:32 27 4
mua khóa gpt4 Nike

Tôi đã sử dụng máy chủ tích hợp liên tục Cruise Control .NET trong vài năm qua và nó hoạt động rất tốt. Gần đây, tôi bắt đầu gặp lỗi này sau khi khởi chạy WebDashboard. Có ai có bất cứ đề nghị về cách giải quyết lỗi này? Tôi có mắc lỗi trong ccnet.cong không? TIA.

LỖI NỘI BỘ: Mục đã được thêm vào từ điển: 'tmp' Khóa đang được thêm: 'tmp'
System.ArgumentException: Mục đã được thêm vào từ điển: 'tmp' Khóa đang được thêm: 'tmp'
tại System.Collections.Hashtable.Insert(Khóa đối tượng, giá trị n đối tượng, thêm Boolean)
tại System.Collections.specialized.StringDictionary.Add(Khóa chuỗi, giá trị chuỗi)
tại System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String&outnameName, String& errorName, String trueCmdLine)
tại System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String&outnameName, String& errorName, String trueCmdLine)
tại Microsoft.CSharp.CSharpCodeGenerator.Compile(Tùy chọn CompilerParameters, Chuỗi trình biên dịchDirectory, Chuỗi trình biên dịchExe, Đối số chuỗi, Chuỗi&outputFile, Int32& NativeReturnValue, Chuỗi trueArgs)
tại Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(tuỳ chọn CompilerParameters, String[] fileNames)
tại Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(tùy chọn CompilerParameters, String[] nguồn)
tại Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(tùy chọn CompilerParameters, String[] nguồn)
tại System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(Tùy chọn CompilerParameters, Chuỗi [] nguồn)
tại System.Xml.Serialization.Compiler.Compile(Tập hợp cha, Chuỗi ns, XmlSerializerCompilerParameters xmlParameters, Bằng chứng bằng chứng)
tại System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] các loại, Chuỗi defaultNamespace, Bằng chứng bằng chứng, tham số XmlSerializerCompilerParameters, Tập hợp hội, Tập hợp Hashtable)
tại System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] các loại, Chuỗi defaultNamespace, Vị trí chuỗi, Bằng chứng bằng chứng)
tại System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, loại loại, chuỗi defaultNamespace)
tại System.Xml.Serialization.XmlSerializer..ctor(Loại loại, Chuỗi defaultNamespace)
tại System.Xml.Serialization.XmlSerializer..ctor(Loại loại)
tại ThoughtWorks.CruiseControl.Core.State.FileStateManager.LoadState(TextReader stateFileReader) trong C:\Tools\CruiseControl.NET-1.9.1.0.source\project\core\state\FileStateManager.cs:line 111
tại ThoughtWorks.CruiseControl.Core.State.FileStateManager.LoadState(String project) trong C:\Tools\CruiseControl.NET-1.9.1.0.source\project\core\state\FileStateManager.cs:line 95
tại ThoughtWorks.CruiseControl.Core.IntegrationResultManager.get_CurrentIntegration() trong C:\Tools\CruiseControl.NET-1.9.1.0.source\project\core\IntegrationResultManager.cs:line 76
tại ThoughtWorks.CruiseControl.Core.IntegrationResultManager.get_LastIntegrationResult() trong C:\Tools\CruiseControl.NET-1.9.1.0.source\project\core\IntegrationResultManager.cs:line 41
tại ThoughtWorks.CruiseControl.Core.IntegrationResultManager.get_LastIntegration() trong C:\Tools\CruiseControl.NET-1.9.1.0.source\project\core\IntegrationResultManager.cs:line 58
tại ThoughtWorks.CruiseControl.Core.Project.get_LastIntegration() trong C:\Tools\CruiseControl.NET-1.9.1.0.source\project\core\Project.cs:line 1367
tại ThoughtWorks.CruiseControl.Core.Project.CreateProjectStatus(IProjectIntegrator integrator) trong C:\Tools\CruiseControl.NET-1.9.1.0.source\project\core\Project.cs:line 1332
tại ThoughtWorks.CruiseControl.Core.IntegrationQueueManager.GetProjectStatuses() trong C:\Tools\CruiseControl.NET-1.9.1.0.source\project\core\IntegrationQueueManager.cs:line 111
tại ThoughtWorks.CruiseControl.Core.CruiseServer.<>c__DisplayClasse.b__d(ServerRequest ) trong C:\Tools\CruiseControl.NET1.9.1.0.source\project\core\CruiseServer.cs:line 475
tại ThoughtWorks.CruiseControl.Core.CruiseServer.RunServerRequest (Yêu cầu ServerRequest, quyền Nullable`1, Nullable`1 loại sự kiện, hành động Action`1) trong C:\Tools\CruiseControl.NET-1.9.1.0.source\project\core\CruiseServer .cs:dòng 1512

Cập nhật: Đây là mã tôi đang làm việc - "Hành động (yêu cầu);" là dòng CruiseServer.cs 1512:

    /// 
/// Đóng gói mã để xử lý yêu cầu.
///

///
///
///
///
///
Phản hồi riêng tư RunServerRequest(Yêu cầu ServerRequest,
Quyền bảo mật?
Sự kiện bảo mật?
Hành động hành động)
{
Phản hồi phản hồi = Phản hồi mới (yêu cầu);
thử
{
// Xác thực yêu cầu và kiểm tra mã thông báo bảo mật
Xác thựcRequest(yêu cầu);
if (quyền.HasValue)
{
CheckSecurity(request.SessionToken,
vô giá trị,
quyền.Giá trị,
loại sự kiện);
}

// Thực hiện hành động thực tế
hành động (yêu cầu);
reply.Result = ResponseResult.Success;
}
bắt (Lỗi ngoại lệ)
{
// Ngoại lệ bảo mật đã được ghi lại, chỉ cần ghi lại bất kỳ ngoại lệ nào khác
if (!(lỗi là SecurityException))
{
Log.Warning(lỗi);
}

// Thông báo cho người gọi yêu cầu không thành công và kèm theo thông báo lỗi (nhưng không bao gồm dấu vết ngăn xếp!)
reply.Result = ResponseResult.Failure;
phản hồi.ErrorMessages.Add(
newErrorMessage(
lỗi.Tin nhắn,
error.GetType().Name));
}
trả lời phản hồi;
}

Đây là chức năng mà nó sẽ thực hiện, sau đó tôi vào "data = IntegrationQueueManager...":

    /// 
/// Nhận thông tin về trạng thái xây dựng cuối cùng, hoạt động hiện tại và tên dự án.
/// cho tất cả các dự án trên máy chủ hành trình
///

ProjectStatusResponse ảo công khai GetProjectStatus(Yêu cầu ServerRequest)
{
Dữ liệu ProjectStatus[] = null;
Phản hồi ProjectStatusResponse = new ProjectStatusResponse(RunServerRequest(request,
vô giá trị,
vô giá trị,
delegate
{
data = IntegrationQueueManager.GetProjectStatuses();
if (request.SessionToken != SecurityOverride.SessionIdentifier)
{
dữ liệu = this.FilterProjects(request.SessionToken, data);
}
}));
if (dữ liệu != null) phản hồi.Projects.AddRange(data);
trả lời phản hồi;
}

Tiếp theo tôi nhập "projectStatusList.Add...":

    /// 
/// Lấy trạng thái dự án.
///

///
///
công khai ProjectStatus[] GetProjectStatus()
{
ArrayList projectStatusList = new ArrayList();
foreach (Trình tích hợp IProjectIntegrator trong projectIntegrators)
{
Dự án IProject = integrator.Project;
projectStatusList.Add(project.CreateProjectStatus(integrator));
}
return (ProjectStatus[]) projectStatusList.ToArray(typeof (ProjectStatus));
}

Cuối cùng, ứng dụng đưa ra một ngoại lệ tại "var LastIntegration = this.LastIntegration;" Trong chức năng này:

    /// 
/// Tạo trạng thái dự án.
///

/// Bộ tích hợp.
///
///
public ProjectStatus CreateProjectStatus(bộ tích hợp IProjectIntegrator)
{
var LastIntegration = this.LastIntegration;
Trạng thái ProjectStatus = ProjectStatus mới(
cái này.Tên,
cái này.Danh mục,
this. CurrentActivity,
LastIntegration.Status,
tích hợp.State,
cái này.WebURL,
LastIntegration.StartTime,
LastIntegration.Label,
LastIntegration.LastSuccessfulIntegrationLabel,
this.Triggers.NextBuild,
this.CurrentBuildStage(),
cái này.QueueName,
cái này.QueuePriority,
this.Parameter);
status.Description = this.Description;
status.Messages = this.messages.ToArray();
status.ShowForceBuildButton = this.ShowForceBuildButton;
status.ShowStartStopButton = this.ShowStartStopButton;
trạng thái trả lại;
}

Khi tôi di con trỏ chuột qua "var LastIntegration = this.LastIntegration", nó báo "this.LastIntegration = 'this.LastIntegration' ném ra một ngoại lệ thuộc loại 'System.ArgumentException'". Cảm ơn bạn rất nhiều vì phản hồi của bạn!

câu trả lời hay nhất

Tôi gặp vấn đề tương tự khi cài đặt chương trình của mình trên một người dùng. Hóa ra vấn đề là do cài đặt Cygwin chứ không phải chương trình của tôi. Đây là liên kết.

https://github.com/git-tfs/git-tfs/issues/135

Về c# - Lỗi nội bộ: Mục đã được thêm vào từ điển: 'tmp' Khóa đang được thêm: 'tmp', chúng tôi đã tìm thấy một câu hỏi tương tự trên Stack Overflow: https://stackoverflow.com/questions/14899652/

27 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress