小编Mag*_*arp的帖子

c#BindingList只读错误

我一直在努力寻找问题的可能原因,但我似乎无法找到它:

错误:

System.NotSupportedException:Collection是只读的.System.ThrowHelper.ThrowNotSupportedException(ExceptionResource资源)位于C:\ Users\aRJiJon\Documents\Visual中WindowsFormsApplication1.Form1.Btn_CSVSEATINGPLAN_Click(Object sender,EventArgs e)的System.Collections.ObjectModel.Collection`1.Add(T item) Studio 2010\Projects\WindowsFormsApplication_1\WindowsFormsApplication1\Form1.cs:第72行

            this.dataGridView1.DefaultCellStyle.Font = new Font("Tahoma", 11);
            bindingCSVSP.DataSource = CSV_Seating_Plan;
            bindingCSVSP.AllowNew = true;

CSV_Seating_Plan.AllowNew = true;
CSV_Seating_Plan.AllowRemove = true;
CSV_Seating_Plan.RaiseListChangedEvents = true;
CSV_Seating_Plan.AllowEdit = true;
this.dataGridView1.DataSource = bindingCSVSP;
this.btn_Process_SP.Enabled = true;
CSV_Seating_Plan.Add(new csv_SeatingPlan());

public string examperiod;
[FieldConverter(ConverterKind.Date, "dd/mm/yyyy")]
public DateTime date_Exam;
public string time;
public string exam_Code;
public string id_Student;
public string name_Student;
public string candidatenum_Student;
public string seat_num;
public string _WSS_EXEC;
public string exam_loc;


#region getsetmethods.
public string EXAMPERIOD
{ get { …
Run Code Online (Sandbox Code Playgroud)

c# bindinglist visual-studio-2010

6
推荐指数
1
解决办法
2086
查看次数

AppInstaller XML 问题

我正在尝试遵循 Microsoft 文档,但我对为什么我的 appinstaller 失败感到困惑:

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller xmlns="http://schemas.microsoft.com/appx/appinstaller/2018" Uri="https://xxxxxx.blob.core.windows.net/installer/Package.appinstaller" Version="1.0.0.0">
    <MainPackage Name="MyApp" Version="12.21.289.0" Publisher="CN=xxxxxx" ProcessorArchitecture="x64" Uri="https://xxxxxx.blob.core.windows.net/installer/MyApp.msix"/>
    <UpdateSettings> <OnLaunch HoursBetweenUpdateChecks="1" /> <AutomaticBackgroundTask/> </UpdateSettings>
</AppInstaller>
Run Code Online (Sandbox Code Playgroud)

如果我运行 MSIX 文件,它会按原样安装。我一直在尝试遵循这个:https : //docs.microsoft.com/en-us/windows/msix/desktop/azure-dev-ops 我收到此错误: 在此处输入图片说明 如果我删除 UpdateSettings 属性,它只会导致另一个错误:“应用程序安装失败并显示错误消息:Appinstaller 操作失败,错误代码为 0x80D05011。详细信息:未知错误 (0x80d05011)”

请帮忙。

xml windows azure-devops msix appinstaller

5
推荐指数
3
解决办法
857
查看次数