Skip to content

Cannot run project after it is built, error with finding the file An exception of type 'System.IO.DirectoryNotFoundException' occurred in System.Xml.dll but was not handled in user code Additional information: Could not find file "IO.Swagger.xml" #2914

Closed
@doughjoe77

Description

@doughjoe77
Description

I've created a .NET MVC Project using Swagger Editor using "PetStore on Heroku" example. The zip file downloads fine and after I extract that I'm able to build the project. When I try to run it I get the following error:

An exception of type 'System.IO.DirectoryNotFoundException' occurred in System.Xml.dll but was not handled in user code

Additional information: Could not find a part of the path 'C:\Users[user]\Desktop\pet-store-api\src\artifacts\Debug\dnx451\IO.Swagger.xml'.

Swagger-codegen version

I'm using the public editor: http://editor.swagger.io/

Swagger declaration file content or url
Command line used for generation
Steps to reproduce

This is in Visual Studio 2015 Update 2

  1. open up the editor on http://editor.swagger.io/
  2. choose the "PetStore on Heroku" example
  3. download the AspNet5 project
  4. extract the zip to a folder
  5. open the project.json with Visual Studio 2015
  6. run the project
Related issues
Suggest a Fix

Seems like the IO.Swagger.xml is not being generated, pre-AspNet5 there was a property on the project that would create that file, seems like it's not being generated now, if it was generated that should fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions