Upon one-click publish: Exception in executing publishing: An item with the same key has already been added

前端 未结 4 820
抹茶落季
抹茶落季 2021-01-21 06:03

I realize that a billion people have asked about this error, but I\'ve looked at all of them. Mine seems different. I\'m not getting any sort of source code error, no stack trac

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-21 06:50

    I was wrong about there not being any changes to the publishing profile. Here is what happened.

    I set up a code-first Entities context called, say, MyDBContext. In my publishing profile myprofile.pubxml, Some code automatically gets inserted like this:

    
      
        
    

    Then, I decide to try the EDMX stuff. But I save my old structure just in case. Now the File looks like this:

    
      
        
    
    

    But then, I decide to ditch the EDMX stuff. Somehow, though, instead of removing the second set of entries in the .pubxml file, this happened:

    
      
        
    
    

    Voila. Second set removed, and I'm good to go.

提交回复
热议问题