RickStrahl / MarkdownMonster

An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
https://markdownmonster.west-wind.com
Other
1.58k stars 236 forks source link

Forking and compiling MarkdownMonster fails #146

Closed havremunken closed 7 years ago

havremunken commented 7 years ago

Hi Rick,

First, thanks for starting this project! Just been testing it out for the last few days and I love it!

I thought I would fork the project and take a look to see if there is anything I am qualified to contribute with. However, the project won't compile on my machine due to a number of problems.

Some of them are relatively low-hanging fruits such as some references to the compiled binary - which does not exist if you didn't already compile it, which you can't, etc. Others I have not yet been able to dive into.

I am happy to take on the task of working on this, unless this is something you are already aware of, something someone is already working on - or if it is something that is only happening on my machine because lets face it, I'm kind of an idiot.

If I start a PR for this, I would of course happily take suggestions and help from others. In fact, I would probably need it for some of the issues.

Thanks for the attention!

RickStrahl commented 7 years ago

Thanks for posting Rune.

It looks like I mucked up the addin dependencies in a recent build when I added assembly forwarding for addins. Basically there were changes that try to ensure that addins can still load if newer versions of the main package assemblies are deployed so addins are somewhat forward compatible.

This wasn't necessary for the built-in addins (ScreenCapture and Weblog) because in those I can easily update the Nuget packages to match the main assembly. While testing though I removed the NuGet packages and explicitly bound to the main build assemblies as an external addin would and those paths are not visible (even though they are relative) to you.

End result: Broken build. :-(

IAC, I've moved the NuGet packages back into the add in projects and now the projects build and run again off a clean Clone.

e485d8868e2f834da69305237059df9c83401457

Let me know if you can clone, build and run now.

Thanks for reporting as I clearly missed this. Aloha.

havremunken commented 7 years ago

Hi Rick,

I can confirm that it now builds cleanly on my machine as well. I guess I just had some bad timing with my clone. :)

Excellent, I'll have a look and try to grok the project!

Thanks again!

havremunken commented 7 years ago

Actually, the first compile worked just fine. Then I played around a bit, and did a new compile, and I got this error:

The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.      D:\src\MarkdownMonster\MarkdownMonsterWeb\web.config    55  

Is that another missing reference? I have not done a website as a solution item before, so I have no idea how to fix this.

RickStrahl commented 7 years ago

That sounds like you need a Nuget package restore. It's a Package reference for the Roslyn compiler tools (something that ASP.NET adds to a project).

The Web project isn't required to build, so if that fails you can just unload the Web project but it's very strange that the first compile worked and then it failed.

havremunken commented 7 years ago

I did a new clone of the project to my machine, and the same thing happened again for some reason; First build was ok, the second not.

Of course I can do as you say and disable the web project, but that provides no satisfaction. ;)

So I dove in. First I did a package restore. That didn't seem to change anything.

So I did an update to the Microsoft.CodeDom.Providers.DotNetCompilerPlatform package, and that error was replaced by another one, referencing Westwind.Utilities. I updated that, then it complained about Westwind.Web. This one was a little bit different - it had a reference to package version 2.69.0, but the latest one I could find using my package sources was 2.68.0. So I "upgraded" to it, and now the project builds again.

I don't know if this is something you wish to change, but at least these are the issues on my machine. I'm guessing you have a newer version of the Westwind packages locally, that could explain it. And as mentioned, building the web site really isn't necessary to look at the actual application, so it might not require fixing.

Edit: Right after posting this, Westwind.Web v2.69.0 suddenly came back to life. I could update to it, and all was well.

RickStrahl commented 7 years ago

Hmmm... i'm not sure why that would be a problem - it works for me here.

The packages - both the CodeDom and the Westwind.Utilities - are not up to date, but that really shouldn't matter because their only referencing themselves in the project. It worked for me too off a new clone with multiple recompiles.

IAC, I just updated the packages to the latest versions and that should work better if you had any version conflicts. I just wonder if there's some problem with NuGet in your setup and perhaps not all packages got pulled perhaps?

a6da339006f5db61ff3c23b7e33c17ba21fe967a

Let me know if that works better for you.

Thanks for following this up - It's always good to get a reality check when somehting doesn't work quite right off a cloned project.