dotnet-websharper / owin

Wrappers for hosting WebSharper sitelets and remoting components in OWIN projects
Apache License 2.0
10 stars 9 forks source link

Can't build locally #2

Closed panesofglass closed 6 years ago

panesofglass commented 9 years ago

I get an error when trying to open the solution in VS2013. The *.proj files in build/net45/ are missing. If I comment out the Import declaration in each project, I can open the projects, but the build breaks within Visual Studio. Can you please provide the build/net45/*.proj files?

Tarmil commented 9 years ago

Actually this project (like most WebSharper extensions) uses IF.Build: the project is defined in build.fsx. The *.sln and *.fsproj files are provided for convenience.

To build the project, you need to run build.cmd (or build.sh on Mac / Linux). This downloads the NuGet packages, builds the project and generates the build/net*/*.proj files. After you've done this once, you can use VS or XS as usual.

panesofglass commented 9 years ago

That's what I did, but I didn't have everything I needed on either Windows or Mac. I tried both and ran the respective build.* files before opening each time.

Tarmil commented 9 years ago

Did the build.* succeed when you ran them?

panesofglass commented 9 years ago

@Tarmil, only on Windows. I can't remember the error on Mac.

panesofglass commented 9 years ago

Here's the error from build.sh on Mac. FYI, this happens regardless of whether or not I have the Xamarin installation on my path.

Ryans-MBP:websharper.owin ryan$ ./build.sh
Package "IntelliFactory.Build" is already installed.
Cannot open assembly '/usr/lib/mono/4.0/fsi.exe': No such file or directory.

Also, the .fsproj files do not include the dependencies or NuGet packages, so I cannot build in VS or Xamarin Studio after a fresh clone.

panesofglass commented 9 years ago

@Tarmil, the problem appears to be a missing build folder:

  <Import Project="../build/net45/$(Name).proj" />
Tarmil commented 9 years ago

OK I see, the issue is that build.sh makes wrong assumptions about the location of fsi.exe, and therefore the build script cannot be run. If you have F# in your path, can you try replacing mono $FSharpHome/fsi.exe in the last line with fsharpi? This should allow you to run build.sh correctly. Once it has finished, the build folder and its contents will be generated, and the fsproj files should be usable.