[英]Get package directory task failed unexpectedly
I was working with some examples about "Constructors" and I made this example on Visual Studio:我正在处理一些关于“构造函数”的示例,并在 Visual Studio 上制作了这个示例:
using System;
using System.Reflection.Metadata.Ecma335;
namespace Classes
{
class Program
{
static void Main(string[] args)
{
var customer = new Customer(1, "John");
Console.WriteLine(customer.Id);
Console.WriteLine(customer.Name);
}
}
public class Customer
{
public int Id;
public string Name;
public Customer()
{
}
public Customer(int id)
{
this.Id = id;
}
public Customer(int id, string name)
{
this.Id = id;
this.Name = name;
}
}
}
But when I try to run the code, I get this message:但是当我尝试运行代码时,我收到以下消息:
The "GetPackageDirectory" task failed unexpectedly. “GetPackageDirectory”任务意外失败。
So what is going wrong here?那么这里出了什么问题呢? Why am I facing this issue?为什么我会面临这个问题?
I would really appreciate any idea or suggestion from you guys.我真的很感激你们的任何想法或建议。
Thanks in advance.提前致谢。
I was working with some examples about "Constructors" and I made this example on Visual Studio:我正在处理一些关于“构造函数”的示例,并在 Visual Studio 上制作了这个示例:
using System;
using System.Reflection.Metadata.Ecma335;
namespace Classes
{
class Program
{
static void Main(string[] args)
{
var customer = new Customer(1, "John");
Console.WriteLine(customer.Id);
Console.WriteLine(customer.Name);
}
}
public class Customer
{
public int Id;
public string Name;
public Customer()
{
}
public Customer(int id)
{
this.Id = id;
}
public Customer(int id, string name)
{
this.Id = id;
this.Name = name;
}
}
}
But when I try to run the code, I get this message:但是当我尝试运行代码时,我收到以下消息:
The "GetPackageDirectory" task failed unexpectedly. “GetPackageDirectory”任务意外失败。
So what is going wrong here?那么这里出了什么问题呢? Why am I facing this issue?为什么我会面临这个问题?
I would really appreciate any idea or suggestion from you guys.我真的很感激你们的任何想法或建议。
Thanks in advance.提前致谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.