2

I'm currently trying to import @FH-Inway's code into my Microsoft Dynamics 365 development environment, both to see if his solution works "as-is", and to try figuring out how, in the future, I might important solutions from colleagues or third parties (assuming they are using git).

After cloning the repository, I moved the metadata from the local instance of the repo into "C:\AOSService\PackagesLocalDirectory" and then created a symbolic link.

After this, am able to successfully open a solution/project in Visual Studio.

However, when I attempt to Start the project, I get

Unable to proceed with debugging. One or more errors occurred. See the exception details below for more information. The underlying connection was closed: An unexpected error occurred on a receive.

Do I need to do something else to import the solution/project?

Brian Kessler
  • 2,187
  • 6
  • 28
  • 58
  • 1
    Did you do a model compile before starting the project in VS? I also think the "original" Metadata folder must be in the git repository folder. You then create a symbolic link into the PackagesLocalDirectory. Your description sounds like you did it the other way around, which I don't think works (something about how Visual Studio interacts with symbolic link folders). – FH-Inway Jul 06 '21 at 18:18
  • You are correct that I did it the other way around. I would not have expected the link should work differently depending whether the VM is the original source of the package. I can try to do it the other way. :-) – Brian Kessler Jul 07 '21 at 12:11
  • @FH-Inway, I've tried making the link the other way (leaving the original files in the repo). When I do it this way: 1. When I browse through the models to build, the D365FOCookbook model is not there and when I try to open the solution from the repository in Visual Studio, it tells me "error: The model 'D365FOCookbook' specified on the project cannot be found." – Brian Kessler Jul 07 '21 at 15:57
  • 1
    Unfortunately, this is another case of "I would have to see it to help you further". What you can try is doing it without the symbolic link. Just clone the repo, then copy the [D365FOCookbook](https://github.com/FH-Inway/D365FOCookbook/tree/main/Metadata/D365FOCookbook) folder into the PackagesLocalDirectory. In Visual Studio, you should now see the model. Do a model build and then start D365FO in the browser. If that works, you can then create a solution and project yourself and add the objects from the AOT. – FH-Inway Jul 07 '21 at 17:55
  • @FH-Inway, I think it is working now, even with the symbolic links as you originally described above... I don't know why it did not work before. If you want to make an answer, I'll be happy to accept it. – Brian Kessler Jul 08 '21 at 09:33

1 Answers1

1

After cloning the repository, I moved the metadata from the local instance of the repo into "C:\AOSService\PackagesLocalDirectory" and then created a symbolic link.

The "original" Metadata folder must be in the git repository folder. You then create a symbolic link into the PackagesLocalDirectory. You did it the other way around, which doesn't work (something about how Visual Studio interacts with symbolic link folders).

FH-Inway
  • 4,432
  • 1
  • 20
  • 37