SourceLink: Embed source with relative paths? - sourcelink

By adding the <PackageReference Include="SourceLink.Embed.AllSourceFiles" Version="2.8.0" PrivateAssets="all" /> tag in my .csproj file, I was able to embed the source files of my library in the nuget package. This was good.
However, when I try to debug into the library from client code, Visual Studio was unable to locate the source because the files it was looking for had absolute paths from the build server, e.g.
Locating source for '/scratch/teamcity/work/d5de3351444bb38d/<ProjectFolder>/<SourceFile.cs>'
Is there something I overlooked that would make this process work correctly?
Update
It appears that the package reference to SourceLink wasn't actually doing anything. Just setting the project to compile an "embedded" DLL was sufficient to get the absolute paths to the source included in the file.
I am building with dotnet on Linux. Is there a compatibility issue with SourceLink.Embed.AllSourceFiles in this context?

Related

How can I download ImGUI on Visual Studio Code without operating on a project folder?

I am planning on using ImGUI for a side-project on visual studio code. I have C++ properly installed such that I can run simple programs on a terminal/command prompt. Thus, I have the correct compiler path for the C/C++ configurations.
I was following this tutorial- https://www.youtube.com/watch?v=VRwhNKoxUtk - until 0:50, where properties was being accessed by clicking on a project. I could not find properties because my C++ and other files are under one file.
I have looked into the documentation from Microsoft Visual Studio Code and several other resources on creating workspace, but that alters my files and the compilation process does not work.
Is there a way of getting the files from https://github.com/ocornut/imgui - with the necessary header and .cpp files- and being able to program in ImGUI without working under a project, but instead a file?
I have tried putting the header files in the include path, but I am not sure if this will work. In that case, why do I need the .cpp files from the github repo? I assume the compiler path does not need to change
The new imports used are as follows
#include <glad/glad.h>
#include <GLFW/glfw3.h>
I am a beginner to visual studio code and C++, so any advice or help would please me.
what is the title of the section at 0:50 of the video:
Importing into Visual Studio
The screen on the video does not look like Visual Studio Code.
VSC does not have a toolbar or a Solution Explorer

How to run AuBio (an Open Source C program) on Visual Studio Express

I am trying to get an open source software called AuBio ( Source ) to run on Visual studio express but I am having a lot of problems getting it to build.
What I've Done:
I opened a new C/C++ solution on VS Express then copied all the header files in the source folder (SRC) into the "Header Files" filter of my project then copied all the C files in the SRC folder into the "Source Files" filter of my project. I have also downloaded all the 3 dependencies required to run AuBio but I do not know where to put them because the "External Dependencies" filter of my project does not seem to want accept them.
Can someone please guide me on how I can go about about building this program?
Addition:
The dependencies are other open source projects; the build instructions for AuBio ( which are HERE ) tell me that I need to install the dependencies before I use AuBio but I have no clue how I can do that.
AuBio also provides a pre-compiled version of it's software (it's cross compiled on MingGW32, and is here) which consists of exe files for each major class and dll files for both AuBio and all it's dependencies, but I have no idea how to use these too, when I download and try to run the exe's they refuse to run.
I am really stuck on this can someone help?
It's not clear what you mean by filter. Do the header files and source files appear in 'Solution View' of the project? If not you need to add them to the project using the Project, Add Existing Item menu command.
Dependencies:
If they are .lib files then add a line like this to your source files:
#pragma comment (lib,"libname.lib")

Add external source files from a library to the project in Eclipse-CDT

I have a project which I try to compile with Eclipse-CDT. The project depends on a library with header files and source files. How can I configure the project in Eclipse such that it will compile the needed source files from the library with the project?
With a makefile I use:
SRC+=lib_source.c
You can add linked source file.
Choose project properties and in the left panel choose c++ general.
Under it choose path and symbols.
Now in the right panel tabs choose source location and add linked source folder.
Include you need to define in "include" (under c++ build you will find settings)
Another approach is to use the operating system to add your libraries to the project. Eclipse then treats all source files (including library files) as part of the project, and therefore compiles any that need it even if they are in the libraries. This set-up allows keeping the library sources in a separate git repository from the project source code. You can record the git commit of a library to provide library version control so that improving the library in one project does not break all the others. The setup relies on the operating system's capability to link directories in a way that is entirely transparent to eclipse--in windows using the mklink command.
In windows the steps are
put your library files in a clean workspace not mixed with .git (you can have .git in the parent directory as egit sets it up)
use cmd window in administrator mode to add a link from your project directory to your library directory.
from eclipse press F5 t make sure your project matches what is on disk, then set up git to ignore your library directory.
set up your library file properties for read only access unless you are still tweaking that library.
set up your project include path to include the project sub-directory in your project.
I can't remember why I abandoned eclipse linked directories; i think it was that the includes kept breaking. The mklink approach has worked flawlessly so far.
I have a pdf tutorial of how to set this up--but I'm new to the forum and don't see how to attach a file.

how to package install version of dotnetnuke from source of it

I changed source of DotNetnuke (a little!) and I want to package an install version of my new DotNetNuke.
How Can I do this?
p.s: I know It's not recommended to change the source but I have no another option
(Telerik calendar do not support my date format and I have to replace it with another calendar !)
Thanks in advance
Answer depends on what you have changed, but the simplest way is to deliver patch that should be installed after normal dnn installation. For example, if you have only changed dll, you can ask to follow normal dnn setup instructions and finally relpace dll. If it's more than on file, you can review how dnn upgrade package is built. It follows same folder structure and places only changed files. So if you have couple of dlls changed in bin, the will be placed in bin folder, and if you have changed some ascx file it should be placed in same path by creating same folder hierarchy.
You can also create a package that can be installed to deploy your changes but for smaller set of files it will be complecated.
Let me know if you need more help.
You can package any change into a DNN install package by including the compiled files along with a DNN Manifest file. This can then be installed via the Extensions page. A manifest file is an Xml file which controls where the contents of an install zip are installed. You can make it as simple or as complicated as you need. You can also include xml merge statements to make changes to the web.config file upon install and uninstall. See the wiki for reference : http://www.dotnetnuke.com/Resources/Wiki/Page/Manifests.aspx
Incidentally, you may have been able to deliver your modified telerik source as a separate provider, and configure it via the web.config, thus saving you from modifying the source code. To do something like that, you would build your own module, and plug it in and replace the standard Telerik references.

Issue in using a .lib in a VS2008/VC project

I wanted to learn how to use a .lib file in my C application.
So, I followed these steps:
Created a empty project in VC++,
Added a .c file,
Added few c functions,
Created a .h file for the same,
Changed the projects type to .lib
Built the project.
No problem till here.
Now,
I copied the .h and the .lib file to desktop,
created another VC++ empty project of type .exe,
In poject prop.->config. prop.->c/c++->additional include directories,I added the path to desktop,
In poject prop.->config. prop.->linker->additional library dependencies,I added the path to desktop,
building the project gives LNK2019 (unresolved external symbol _...) and fatal error LNK1120 (unresolved external symbols).
What am I doing wrong? Also what would be the steps to use a .dll instead of .lib?
Configuration: Windows 7, VS2008.
You also have to add the library by name to the list of Additional Dependencies in Linker->Input options for your Project.
Do you really want this linked in from the desktop, by the way? Typically some project-relative path or environment variable would be the way to do this - you do not want to link from desktop on a build server, for example.
Switching to a DLL will not help because you still need to use the export library (.LIB) file for your DLL to satisfy the link-time dependencies.

Resources