查看未在azure中更新的模型类

时间:2017-01-24 16:24:25

标签: asp.net-mvc asp.net-core asp.net-core-mvc

我的网站现在已经关闭,因为我已经更新了RegisterViewModel并在本地进行了测试,并且工作正常。我添加了一个新字段'通知' 然而,在发布到azure之后,我的网站崩溃时出现以下错误:

void Main()
{
    Panel panel = new Panel();
    Graphics g = panel.CreateGraphics();
    Pen p = new Pen(Color.Black, 1);

    GraphicsPath rect = new GraphicsPath();
    rect.AddRectangle(new Rectangle(0, 0, 10, 10));

    GraphicsPath li = new GraphicsPath();                   // Intersects with Rect
    li.AddLine(new Point(1, 1), new Point(20, 10));
    li.Widen(p);

    GraphicsPath lc = new GraphicsPath();                   // Contained in Rect
    lc.AddLine(new Point(1, 1), new Point(2, 2));
    lc.Widen(p);

    GraphicsPath ln = new GraphicsPath();                   // Not contained or intersect
    ln.AddLine(new Point(20, 20), new Point(30, 20));
    ln.Widen(p);

    HitTest(rect, li, g);
    HitTest(rect, lc, g);
    HitTest(rect, ln, g);

    g.Dispose();
    panel.Dispose();    
}

private void HitTest(GraphicsPath a, GraphicsPath b, Graphics g)
{
    Region ar = new Region(a);
    Region br = new Region(b);

    Region cr1 = ar.Clone();
    Region cr2 = ar.Clone();

    cr1.Union(br);
    cr2.Intersect(br);

    if (cr2.IsEmpty(g))
        ("No Intersect, No Contain").Dump();

    else if (cr1.Equals(ar, g))
        ("Contain").Dump();

    else 
        ("Intersect").Dump();   
}

此处有更多详情:

'RegisterViewModel' does not contain a definition for 'Notifications'

1 个答案:

答案 0 :(得分:1)

有时需要覆盖dll,这可以通过确保在部署到现有应用程序时清除以前的文件来完成。这是在Visual Studio中执行此操作的方法:

The display in Microsoft Visual Studio

在FILE PUBLISH OPTIONS下的中心,请勾选:删除目的地的其他文件 也许较旧的文件会干扰新文件!