Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 713
  • Last Modified:

DLL changes do not work till DLL version is changed

Hi all,

I have a custom SPJobDefinition dll deployed on my SP Server (written in C#).

Any changes I make in the dll do NOT get reflected until I change the dll version (while I want it to work right after deployment without having to change version with every minor change I make).

Any help will be appreciated?

Thanks.

0
m_a_n
Asked:
m_a_n
  • 4
  • 3
1 Solution
 
jagssiduralaCommented:
You have to change the DLL version if you done any code changes.

currently you are replacing the new DLL manually. Instead there many Sync tools available in the market, you can use them to copy the DLLs automatically.

Then apply hourly or minute basis Sync between from New DLL location to your production server or SP server .
0
 
m_a_nAuthor Commented:
In any other .NET project that I work on, I do not have to change the version for any changes. Then why would I be forced to so in this case?

Thanks for your time!
0
 
jagssiduralaCommented:
The scenario is like this

We have .net solution, in that we can add website, Class Library(where we write classes).

1) Build the Class Librarery, you will get a DLL in debug folder
2) Then Right click on the website and add the DLL by selecting the "Add reference" option.

Thats it.

Then if you do any changes in DLL, just build the Class Library first and Then build the website. The will effect to the website.

Here the creation and consuming both are in one solution and also we have added DLL by selecting "Add refernce". So definatly we can not change DLL version again and again just we should build the Class Library and web site respectively.

I think Your scenario is not like this. DLL location and consuming location(SP server) is located different location. if this is the situation we should change DLL version every time.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
m_a_nAuthor Commented:
Can this have something to do with persistent objects?

SPJobDefinition inherits from SPPersistedObject.

(
Thanks jagssidurala,
  1. My location is same for dev and deployment as I am in DEV environment.
  2. Even if locations were different, still I have never needed to change the DLL version in so many other projects that I have completed.
)

Any clues?



0
 
jagssiduralaCommented:
compare the existing project architecture and the current project again. you can find the difference.

otherwise explain me the old architecture so that i will help you.
0
 
m_a_nAuthor Commented:
Well, thanks all for your time and efforts.

The way I got it working is:

In the C# code delete the existing SPTimerJob and create a new job every time with same arguments as the previous job.

I believe this is the case with Persisted Objects.

Have a good day all.
0
 
m_a_nAuthor Commented:
Thanks for everybody's help, though what worked for me was some help from a workmate who advised that I delete and recreate jobs in the code.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now