Ejemplo n.º 1
0
            public PublishesExpression Assembly(string assembly, string name = null)
            {
                // TODO -- Need to create the binary on the fly
                if (name.IsEmpty())
                {
                    name = assembly.Replace(".dll", "");
                }


                // Fake the binaries
                var binaryPath = "src{0}{1}{0}bin{0}Debug".ToFormat(Path.DirectorySeparatorChar, name);
                var binaryFile = "{0}{1}{2}".ToFormat(binaryPath, Path.DirectorySeparatorChar, assembly);

                // ..\..\src\Bottles\bin\Debug\Bottles.dll
                var relativePath = "..{0}..{0}{1}".ToFormat(Path.DirectorySeparatorChar, binaryFile);

                _spec.AddPublishedAssembly(relativePath);

                var files = new FileSystem();

                files.CreateDirectory(_solution.Directory.AppendPath(binaryPath));
                files.WriteStringToFile(_solution.Directory.AppendPath(binaryFile), "");

                return(this);
            }
Ejemplo n.º 2
0
            public PublishesExpression Assembly(string assembly, string target)
            {
                var name = assembly.Replace(".dll", "");
                // ..\..\src\Bottles\bin\Debug\Bottles.dll
                var relativePath = "..{0}..{0}src{0}{1}{0}bin{0}Debug{0}{2}".ToFormat(Path.DirectorySeparatorChar, name, assembly);

                _spec.AddPublishedAssembly(relativePath);
                return(this);
            }